PHP Labs: Scripts, code and tutorials
NEW! Search Engine Bot Authentication: PHP code to authenticate search engine bots.
Welcome to the PHP Labs! Here you will find bits and pieces of code that will help you create more elaborate PHP scripts. The complete list is below, and it will keep growing. Any ideas or code snippets are welcome! Please send them in. Enjoy!
Free Scripts
eKstreme.com is home to many free PHP scripts written by me. In no particular order:
- PHPCounter a free website statistics and hit counter script. It is a free PHP counter that uses a text file for the database.
- PHPTraK is a link tracking script written in PHP. It uses a text file as its database and can track an unlimited number of links!
- Zeta Portal is a free PHP portal script that does not require a database!
- egbook is a free feature-packed PHP guestbook!
- Website spell checker to - ummm - spell check any URL you give it.
- CrawlerController to help you fight referral spam on your website.
- Website Button Maker to make website buttons of any size, especially like this one:

- AJAX-PHP Link Tracker: An AJAX/PHP/MySQL script to track which links on a page are clicked by users. Very cool!
Code Snippets
- How to send an email using PHP. A bit of code telling you how to send an email from your PHP scripts.
- PHP hostname to get server's real name. A single line of code to know your server's real name.
- Dynamic image creation. A basic code fragment to create a JPEG image on-the-fly in PHP.
- Colour-coded PHP Code Output. Learn how to display PHP code in a nice syntax-colour-coded format using a built-in function.
- NEW! Search Engine Bot Authentication. Search engines like MSN and Google send out bots to retrieve web pages. How do you for sure that a request is one of these bots and not a spoof?
Tutorials
- 301 redirection code examples. This is Part 2 of a two-part tutorial about 301 redirection.
- Geotargeting tutorial. Explains how to set up and use geotargeting on a website. Complete with code examples.
Some code shown not working? See the code help page please.
PHPLabs has made it to the Open Directory Project! Please view the full list of directories that eKstreme.com scripts are listed on. Thanks!
