Category PHP code

We post new PHP code snippets from time to time. If we need to write some code which might be useful for others, you will find that code in this category. From time to time we write PHP tutorials, too. Sometimes our code snippets are written for a special case and they might not fit in your own application. In that case we hope that our code was helpful and good enough for a quick study. If you like to share your own code, just submit the snippet to the support section.

If you look for the other PHP classes, please check our PHP script archive.

Sending e-mail messages within your web application is an important function and is often the only way to get in contact with your customer. How often have you got some email message from a potential customer with an invalid email address? Sure you can use advanced regular expression patterns, but these patterns are not smart...

CodeIgniter is a PHP framework build by EllisLab the creator of Expression Engine. In this tutorial I will cover the basics while creating a simple guest book application. First of all you need the latest version of CodeIgniter, so grab the latest release and upload the files to the root from your website. CodeIgniter uses the Model...

  • images
  • February 2, 2012

I’m using this function on almost all my websites: The function works like the sub_str() function in PHP, but without to break all the words in pieces.

  • images
  • September 24, 2011

In previous versions was it possible to validate the file extension while using the PHP upload class. Today we released a new version where the file’s MIME type is checked too. We added the new method validateMimeType() and changed the existing method validateExtension() which will call the new method. The extension from a file is...

  • images
  • September 16, 2011

With this simple script it’s possible to count and track (country code and IP address) clicks from a visitors which followed a link to one of your link partners or advertisers. This script can be used together with your existing link database or, if you have made some modifications, with an array of links. I...