Tag: PHP

Twitter PHP and SimpleXML feed

Just like the Google Charts API the Twitter API can be super simple. Twitter uses a few different XML feeds to send and receive data from a given user, some feeds require a user name and password supplied through Curl but a few are publicly available to all. This example will use the built in […]

Google Charts Example

API’s are becoming more popular on the web as many of the big online companies such as Google, Yahoo and Facebook offer there own open source code for web developers to use freely and easily. To begin with I am going to go through how to use the Charts Basics API from Google. This is […]

Random Banner with PHP

This is a quick tutorial which shows how easy it is to make a random banner script with PHP. We will use a PHP array of images which is populated by a given directory and select a random index from the array to be the banner. For this example I have chosen to list the […]

Fix Canonical URL with link rel=”canonical” in PHP

Recently the major search engines have worked together to help fix one of the biggest problems in SEO, The canonical URL. With this quick fix all you need to do is add a tag to the <head> section of the page and search engines will use this as an anchor to index the page. since […]

SEO Friendly Redirects with PHP

With a basic redesign you probably wont have this problem but if you have rebuilt a website even with the same content if the URL’s have changed this will have a huge effect on your search engine presence as you will be starting from scratch. Your links from internal pages may not work, links from […]

Tracking visitors with PHP and Predefined variables

Although Google analytics can tell us a lot about who is visiting our websites it is still flawed in many ways. Google analytics is a powerful tool but if the user has disabled Javascript or you want to know live stats it can be pretty useless. Developing our own can be much more versatile as […]

PHP foreach loop through post request

I use a variation of this code on most websites I have coded as it is versitile and full of uses when working with dynamic content. An example might be reusing the same mail() function for differant forms, you could loop through what is posted to it and print it out in the body of […]