PHP

Posts about the server side scripting language PHP

PHP5 Error Reporting

Saturday, January 26, 2008 - 17:45

PHP has some very nice error reporting features, which can tell you many things about the code that you are trying to execute. This error reporting is always nice to have available when debugging code as it helps you solve many of the common mistakes that occur when creating dynamic web pages.

Category: 

Downloading Alexa Data With PHP

Wednesday, January 23, 2008 - 11:01

It is widely known that the data that Alexa offers on visitor numbers is far from accurate, but it is possible to obtain an XML feed from Alexa that allows you to find out all of the data that Alexa offers, which is more than just their visitor numbers. Passing the correct parameters to this feed you can find out related links, contact and domain information, the Alexa rank, associated keywords and Dmoz listings.

As an example here is a feed URL for getting information about the bbc.co.uk page.

Category: 

Alternate If Statements In PHP

Sunday, January 20, 2008 - 21:10

If you have programmed in PHP for any amount of time then you will be farmiliar with the if statement. The syntax is as follows:

Category: 

Aborting Connections In PHP

Saturday, January 19, 2008 - 23:15

Sometimes in PHP you will have to do some things that might take a little time. You will therefore have a little trouble with users closing the browser or moving to another page before the script has finished. In this case you will want to either continue to execute the script just shut it down depending on what the user has done.

Category: 

How To Read A Remote IP Address In PHP

Wednesday, January 16, 2008 - 14:44

PHP keeps certain variables to do with server and networking in an associative array called SERVER. To find out the remote address of a user you can use the array identifier REMOTE_ADDR. This is used in the following manner.

Category: 

Setting php.ini Location In Apache

Tuesday, January 15, 2008 - 10:55

After installing PHP on Apache you can use the php.ini file to set various different options to do with PHP. When Apache starts it uses what is contained in this file to set up and run PHP.

On both Windows, Unix and Linux systems Apache will look in a number of default locations for the php.ini file before giving up. You can explicitly tell Apache 2.x where to look for the file by using the PHPIniDir directive in the http.conf file.

Category: