ASPit - Totally ASP JSit - Totally JavaScript
Search PHPit

Use this textbox to search for articles on PHPit. Seperate keywords with a space.

Advertisements

Miscellaneous


iif function

Wednesday, August 11th, 2004

The IIF function is a well-known function in most languages, however PHP does not contain such a function. It does now, if you include this function into your php files.

PHP Amazon Web Services Class

Wednesday, August 11th, 2004

This class, written by Dennis Pallett, is used to query Amazon Web Services (a developers’ token is required), and retrieve results from Amazon. The class includes automatic caching for increased stability and speed of your website.

Ban certain IP addresses

Sunday, May 23rd, 2004

Using this handy codesnippet you can easily ban several troublemakers from your website. Please note though that this is far from foolproof, and people can very easily get around it, by using a proxy or changing their IP address (e.g. dial-up users, AOL users, etc).

FTP Upload

Saturday, May 22nd, 2004

This codesnippet can be used to login into a FTP server, and then upload a file. Common use might be for backup purposes on a off-site FTP server.

Encode e-mail address

Friday, April 2nd, 2004

Use this handy function to encode e-mail addresses so it still looks good to humans, but can’t be read by (spam) bots.

Crop sentence

Friday, April 2nd, 2004

Use this handy function, written by David Speake, to crop a sentence to a certain length. This function makes sure the words don’t get broken up in the middle.

Sort array alphabetically

Friday, April 2nd, 2004

This function, used in conjunction with the usort() function, allows you to sort a n array alphabetically, e.g. usort($feeds, “cmp”);

Get month name

Friday, April 2nd, 2004

This function changes a numerical month (e.g. 3) into the name of that month (e.g. March).

Javascript Redirect

Friday, April 2nd, 2004

With this function you can easily redirect to another page, after a certain amount of time (in seconds).

Javascript GoBack

Friday, April 2nd, 2004

This function can be used to redirect to the previous page, after a certain amount of time (in seconds).