Hello all,
I had a project for developing a website for a NGO.
I had a doubt:
The website is already working with lot of flaws and had very few pages.
This website is made in Php and They want me to make it more secure.
So i want to make this website using Microsoft .NET Framework.
If i make this website from scratch and then...
HI guys, Take a look at the map coordinates on this page. This is linked in from Wikipedia and the coordinates are passed the query string. I'm not sure of teh actual terms for this but How do I convert the coordinates as they are noted as:
37° 14′ 6″ N, 115° 48′ 40″ W
Into as so..
37.235, -115.811111
...a format which is readable by...
<?php
$url = 'here i give a url';
$raw = file_get_contents($url);
preg_match('/\w(\d*).*?\$/',$raw,$matches);
echo $matches;
?>
in a given external website I need the closest number to the first appearance of a symbol here the symbol is $
this is what I tried for now I just get "array" printed
...
Hi All. Using PHP and Zend_ACL, I want to create an extremely flexible permissions system. I want to be able to assign permissions to all objects of a certain type, as well as to instances of those objects. If a specific instance of an object is queried and it doesn't exist in the resource tree then the permission set for the 'generic' o...
$dirname1 = '../counters';
$dirN = '../uploads';
$extens = ".txt";
$fh = fopen(".$dirname1/$filename.$extens", "w");
if(fopen(".$dirN/$filename.", "r")) {
$count_my_page = (".$dirname1/$filename.$extens");
$hits = file($count_my_page);
$hits[0] ++;
$fp = fopen($count_my_page , "w");
fputs($fp , "$hits[0]");
...
I'm building a PHP/MySQL app where users can log in and search for media assets. They can also save searches and create lightboxes (collections of assets). Finally, they can create user groups.
Does it make more sense to query all at once, at log in, for the id's for their saved searches, lightboxes, and groups and save those in sessi...
If i want to create an url using a variable i have two choices to encode the string. urlencode and rawurlencode.
What exactly are the differences and which is preferred?
...
A few minutes ago, I asked whether it was better to perform many queries at once at log in and save the data in sessions, or to query as needed. I was surprised by the answer, (to query as needed). Are there other good rules of thumb to follow when building PHP/MySQL multi-user apps that speed up performance?
I'm looking for specific w...
Hi guys, I have a simple membership project and teh client wishes that urls be simple rather than having something like:
index.php?p=view-member&id=568157&hash=00218546598797898798162454712
he would like to see it as so:
website.com/member/username
Now I've worked with Zend and understand you need to do some htaccess alterations to g...
I have a string which could contain multiple delimiters right next to each other, for example |||, although it could be any number of adjacent delimiters. I need to replace any place "in between" the adjacent pair with a specific character. These delimiters will only need to match if there is no character between the delimiter, not even...
I'm using PHPs imagecreatefromjpeg to load a jpeg from disk and imagejpeg to output that image to the browser. For some reason though, this function is only outputting the image when the server is running on a Windows development box. On our Linux server, its not outputting any data (ie. Content-Length: 0, nothing is displayed).
Are t...
I have a PHP class that stores database query results, but also contains a PDO object so that the results can be updated/re-inserted/etc on the fly. A makeshift ORM, if you will.
Problem is, I need to serialize this class but instances of PDO cannot be serialized. I'm ok with that; by the time the object gets serialized, I have no nee...
Hi all,
The application that I am having trouble with is a generic web application... nothing special about the way it handles users. That is to say, I handle user information in the session variable, with the session managed via a cookie.
A client of mine is having an issue whereby the users are logged in and every now and again they ...
Is this old way to explain
for PHP oop, if he use var thing?
for example,
<?php
class person {
var name;
}
?>
...
I’m uploading products via the Magento API and they are not showing up in the frontend. I have to go into the backend, open them up, change nothing, save the product and then it will appear.
Any idea why? I assume the act of saving it in the back end, is saving some extra flags in the DB, I just don’t know what.
...
I'm building a project that uses source from a project that's been built from a project that uses code under MIT and GNU licences.
What steps do I need to take to make sure that the source has the correct licence files in the right places?
The project in question is a php plugin for another app, not an executable.
...
I'm trying to write a regular expression in PHP. From this code I want to match 'bar'.
<data info="foo">
"bar"|tr
</data>
I tried this two regex, without success. It matches 'foo"> "bar'.
$regex = '/"(.*?)"\|tr/s';
$regex = '/"[^"]+(.*?)"\|tr/s';
Anyone can help me?
Thank you.
...
Is it best to use a pre created class / api for database interaction (e.g Pear MDB2 or php's PDO) or create your own?
I will be only be using mysql with 1 database and perform relatively simple SELECT, INSERT, UPDATE, DELETE queries.
...
With all things being equal whats currently the more mature PHP library for Amazon Simple Queue Service? I'm looking for good Object Oriented PHP 5 code. What were your experiences on the library you choice? Any performance problems?
I'm building a system that needs to handle handing off messages to an unlimited amount of worker processe...
I have been working with the Microsoft stack, and would like to get a little bit of experience with alternative stacks, like LAMP, in my spare time.
The P in LAMP, is usually "PHP", but can be Perl (or Python, but I am considering Perl or PHP above Python.). I am gravitating towards Perl, because it looks like it would be useful in othe...