Archive for the ‘PHP’ Category

PHP Currency Conversion – Exchange Rates XML

With this script you can freely convert between 36 different currencies from around the world. The script uses exchange rates downloaded from the European Central Bank via an xml file located at www.ecb.int/stats/eurofxref/eurofxref-daily.xml. The rates are then stored in your own MySQL database for use and then updated daily. Example: £2.50 = $4.03 If you [...]

Screen Scraping AWStats

If you need to fetch statistics and information from your AWStats in order to re-use or integrate the data into another web application then you can do this by screen scraping the required information. The following scripts allow you to fetch unique visitor numbers and phrases for which people have come to your site after [...]

PHP Password Generating

This script allows random passwords to be generated of any required length with any combination of characters. Randomly generated password: m1ztpxw8 The code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 <?php function genPwd($length=6) { $password = ”; $possible = ’23456789bcdfghjkmnpqrstvwxyz’; $i = 0; while ($i < $length) { [...]

Resizing images with PHP

The following script will easily allow you to resize images using PHP. The code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 [...]

PHP Captcha Security Images

This script generates images (known as “Captcha’s”) which contain security codes used for protecting a form from spam bots. By encoding a ‘password’ inside an image and asking the user to re-enter what they see you can verify the user is a human and not automated software submitting your form. Why not try out the [...]

PHP Captcha Security Images Help

Firstly make sure you are using the latest version of the captcha script available on http://www.white-hat-web-design.co.uk/blog/php-captcha-security-images/ Check you have the required GD & FreeType libraries. This can be done by putting the following in a new file and checking the output mentions GD & FreeType 1 2 3 <?php phpinfo(); ?> Perl Formmail Unfortunately this [...]