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 the category. 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 or good for a simple study. If you like to share your own code, just submit the snippet to the support section.

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 guestbook 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 View...

  • 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...