30 Lessons To Learn And Code


Get Keyword Frequency In PHP

March 31

In this tutorial we're going to find out how we can get the keyword frequency from a string or even a webpage in PHP. This information is useful when you're...


Convert Image To Data URI With PHP

July 8

One of the easiest ways to speed up your page loading times is to reduce the amount of HTTP requests that your website makes, each time your webpage needs to...

Get Image Src With PHP

April 22

There are some occasions where you need to get the attribute value in PHP from a HTML element, this can be for migration reasons or perhaps you are writing a...

Calculate Different Shades Of A Colour

January 7

There are different ways colours are defined the two most popular values in web are HEX or RGB. Both of these values have a logical formula to working out what...

Cache Google Web Fonts Api

November 19

Google web fonts is a huge library of free web friendly fonts you can easily use on your website. The fonts are loaded in to your website with Javascript and...

Force Browsers To Load Latest CSS And JS

October 30

In modern browsers they will cache most external aspects of the website, they will cache all images and even stylesheets and javascript files of your website. During a website redesign...


PHP Template Engines

August 27

A PHP template engine is a way of outputting PHP in your HTML, without using PHP syntax or PHP tags. It's suppose to be used by having a PHP class...


Automatically Detect Browser Language With PHP

June 20

When you are working on a multi national website you may need the functionality to translate your website into different languages. There are many ways you can translate a website,...


PHP Debug In Browser Console

June 12

When debugging in PHP there are a few techniques you can use, you could use something like Xdebug which will allow you to step through your code at run time...


Resize Image Class With PHP

May 20

A common feature that you will across in websites is the ability to resize an image to fit an exact size so that it will displayed correctly on your design....


Check A Credit Card Number Passes Luhn Check

April 9

When you accept credit card numbers on your website you need to do a number of different validation checks on the credit card numbers the user enters. When the form...


Create A Weather Application With Google API Using PHP

February 7

As of August 2013 Google shut down it's weather API. The following tutorial will not work with the Google weather API but you can use the following code for another...


Display Message To Stumbleupon Visitors In PHP

January 21

Stumbleupon is a great way of getting lots of visitors to your site. All you have to do is submit your pages to Stumbleupon and when people stumble in their...


Display Gravatar From Email Address

January 16

In a previous article you learnt how you can display the the author avatar in WordPress. But if you aren't using WordPress then you will need to use a Gravatar.


Use PHP To Detect An Ajax Request

January 8

Here is a quick PHP snippet that you can use to tell if the request coming to the page is from a form or from an Ajax request. Where a...


Get Any Website Alexa Rank Using PHP

November 9

In past tutorials here you have learned how to get your Twitter followers and your Feedburner subscriber numbers. They are both useful information to use to judge how popular your...


Display Feedburner Subscribers

October 11

The Feedburner API has been shut down since October 20th 2012. You can still use the counter widget but can not use the API directly any more. What Is Feedburner?...


Display Different Content For Visitors From Twitter

September 16

For website marketing reasons you might want to see how a visitor is finding your site so you can display a different message for different users.


Cross Domain AJAX Requests

August 16

Introduction Now on the web AJAX calls are becoming more and more common, they can be very useful to create a better user experience on your web applications. But on...


How To Make A Simple Paginate PHP Class With Light & Dark Styles

August 3

View Demo


How To Use Twitter API To Display Your Twitter Updates

July 28

Updated: On March 5th 2013 Twitter is closing down the first version of the API and it will be fully replaced by version 1.1. Learn how to use the new...


Create Tiny URL Link With PHP Function

July 25

Tiny URL site allows you to compress the size of your URLs which is mostly used on the social networking site twitter, because of the limited characters you can use....


PHP Code to Combine and Compress CSS

July 18

A couple of Google updates ago they worked on page loading speeds, so if your page loaded faster then your website will be ranked higher. Easy ways to improve on...


PHP Password Generator Snippet

July 11

Get stuck trying to pick a new password each time you signup to a new service or website. Most people do use the same password on every site that they...


Get Twitter Followers From Twitter XML

July 6

As of March 5th 2013 this technique will not work anymore as this uses the old Twitter API, to learn how to use the new Twitter API have a look...


Learn How To Create An AJAX PHP Coming Soon Page

July 4

In this tutorial we are going to learn how to create a Coming Soon Page which allows the visitor to send their email address which can be delivered to an...


Compress multiple CSS Files

April 17

If you are using multiple CSS files on a large website sometimes they can take along time to long the best way to deal with this is to compress the...


Calculate distances in PHP

April 13

Here is a code snippet which allows you to calculate the distance between longitude and latitudes in either miles, kilometres or nautical miles.


Speed up Page Load by reducing HTTP requests with PHP

April 11

A nice technique to speed up your page loading times is to try to reduce the amount of calls your browsers has to make to the server. This will be...


Using cURL in PHP

March 11

PHP/CURL is a binding that uses libcurl. It means that the PHP team has written a glue layer for PHP that speaks to the underlying libcurl. That layer, the binding,...