Latest Posts



"RT @willfrancis: The ultimate near-miss of 2019."

@ashleyford 2 hours ago

"RT @bendhalpern: Client-side validation"

@ashleyford 7 days ago


Originally created by Rasmus Lerdorf in 1994, the PHP reference implementation is now produced by The PHP Group.

Caching Dynamic PHP pages easily

I’ve been looking for a solution to cache heavy pages and just serve a static html version for a little while now, and I’ve found a solution in output buffering. Things to think about It’s not a good idea to go away and cache your entire site, you need to think about which pages receive high traffic, and which pages make [...]


PHP cookies Quick

Cookies are mainly used to authenticate a users session, they are small packets of data that are stored in the web browser that allow a website to match specific user information to that in the database, thus authenticating the user. So what are the values? $name – is what you want to call the cookie, we will use this to reference the [...]


Using the Twitter Search API

Twitters new search feature is great for finding interesting people and topics to follow. So i wrote a script to get search results from twitter and display them on your site. This could be integrated into an existing application or used standalone to follow a particular topic or keyword on twitter,  Check the Demo. The script uses PHP [...]


Using PHP and CSS to make a simple graph

Here’s an easy way to display a simple percentage graph using PHP to work out the percentages and do the maths and CSS to display the data on our page. Here’s the demo. First you need to copy the CSS below into the head of your page, you can style this to suit your needs once we have the PHP in place to render our graph. I used [...]


Using the Twitter API

TWITTER HAS CHANGED ITS API METHOD THIS TUTORIAL WILL NO LONGER WORK. Here’s a simple introduction on using the Twitter API. The API offers many different ways to connect to your details including xml, json, atom, and rss. Im going to use xml, php and curl to read an xml file to get my latest followers tweets and display them in the [...]


PHP regular expression Twitter links

Here’s a quick piece of code to highlight replies to users in twitter for example @ashleyford this script uses regular expression to find and replace a based on two things. Firstly it checks for a space before the @ symbol and then checks for the space at the end of the users name, it then takes that string and replaces it with a link [...]