PHP Tutorials

  • By
    Image Protection Using PHP, the GD Library, JavaScript, and XHTML

    Warning: The demo for this post may brick your browser. A while back I posted a MooTools plugin called dwProtector that aimed to make image theft more difficult -- NOT PREVENT IT COMPLETELY -- but make it more difficult for the rookie to average user...

  • By
    PHP, SSL, and cURL SSL3_GET_SERVER_CERTIFICATE Errors

    I recently developed a complex system for a customer that involved PHP, cURL, and a SSL connection to a third party vendor. The third party vendor would validate the security certificate of the source (the system I created) and either allow or reject access.

  • By
    Method Chaining in MooTools and PHP

    One of the great parts of most every JavaScript and PHP framework these days is the ability to chain class methods. I've gotten quite a few question about how this is possible so I want to cover the basics of allowing chaining in your own...

  • By
    Create a Zip File Using PHP

    Creating .ZIP archives using PHP can be just as simple as creating them on your desktop. PHP's ZIP class provides all the functionality you need! To make the process a bit faster for you, I've coded a simple create_zip function for you to use...

  • By
    PHP Headers and Popular Mime Types

    Like my Create a Basic Web Service Using PHP, MySQL, XML, and JSON illustrates, even though a file's extension ends in PHP, you can still tell the browser that you're outputting a different content type. Here are a few of the more popular content...

  • By
    Create a Basic Web Service Using PHP, MySQL, XML, and JSON

    Web services are taking over the world. I credit Twitter's epic rise to the availability of a simple but rich API. Why not use the same model for your own sites? Here's how to create a basic web service that provides an XML...

  • By
    PHPTVDB: Using PHP to Retrieve TV Show Information

    I'm a bigtime TV/movie buff. If it's ever seen the light of day on HBO or BBC America, I've seen it (and quite possibly filmed my own made-for-TV-short-film). Unfortunately IMDB doesn't provide an official API for movies and TV shows but thankfully

  • By
    Create Short URLs Using U.Nu

    I was recently referred to another URL shortening website called u.nu. As far as shortening services go, u.nu seems to have the field beat as far as the shortest base URL. If you're really intent on creating the shortest possible URLs, look no...

  • By
    Create Bit.ly Short URLs Using PHP

    One of the more popular URL shortening services is Bit.ly. I've showed you how to create short URLs with TinyURL and Is.Gd, so why not show you how to create Bit.ly URLs remotely? The PHP Note that Bit.ly requires you to sign up for an account.

  • By
    MooTools’ AutoCompleter Plugin

    One of the famous MooTools plugins is Harald Kirschner's AutoCompleter plugin. AutoCompleter takes a term input by the user and searches for matches -- an obviously help to the user. Here's how to make the most of Harald's great plugin. The XHTML All we...