Here’s a very simple solution to handling a variety of HTTP errors like 404, 500.. etc in one php file. All we need to do is create an array of error codes and match against them by picking up the …
Continue reading
Here’s a basic but useful snippet to either check that a website is online or domain exist. It’s a very simple function that uses CURL to check the response from a given URL. if a response is received we can …
Continue reading
I thought it would be a nice little project to write a tutorial on how to build a basic but powerful weather application for either mobile devices or the desktop. The application takes a set of Google weather API feeds …
Continue reading
I had a project recently that required the user to select their country from a drop down list and store the data in a database. It was such a long process setting up the PHP switch statement that I thought …
Continue reading
When you have a fully dynamic site it’s useful to show the user where they are by breaking down the URL structure so they can navigate backwards through the site. For example this url: http://papermashup.com/categories/jquery/ shows that ‘jquery’ is part …
Continue reading
Quite often when developing big web apps you may need to use mod_rewrite to generate SEO friendly URLs from a string of text, Very similar to the way Word press generates URLs for blog posts. The Code Below is the …
Continue reading
Every database needs to be backed up and if you’re currently doing it manually you can stop because there’s a simple solution using PHP. With this script you can either pass a specific table to backup or choose to backup …
Continue reading
I was looking for a simple way to automatically detect a users language using PHP and came across this interesting snippet which does just that. It uses the PHP superglobal ‘HTTP_ACCEPT_LANGUAGE’ which returns something like this for me “en-US,en;q=0.8″. This …
Continue reading
MySpaceID allows MySpace Users to easily come into your site and get going by bringing their identity with them. By allowing Users to link their MySpace account with your site, a Developer can enable social functionality. This guide is designed …
Continue reading
When you get to a stage when you need to pass user data from one page to another you have the option to do this without the user knowing by using PHP Session variables. Sessions are basically server-side cookies which …
Continue reading
The MySpace Search API allows you to search MySpace for user, videos, images, and music. With an individual feed for each search item. It is designed to function like a search on the MySpace website and to have a response …
Continue reading
Regular readers of Papermashup will have seen the post that I wrote last week on Easy Poll, the personal project that I launched a few weeks back that allows you to create a simple 2 answer poll that you can …
Continue reading
I was sat in the sun at the weekend and sporadically decided to do a little project like wedeliver you can read about the adventure I had building the 24hr project here. This project on the other hand probably took …
Continue reading
I’ve put together a nice little collection of scripts over the past year or so, and have decided as it’s approaching summer in the UK (sorry winter in Australia!) to do a download bundle of 20 assorted scripts where you …
Continue reading
I wrote a post mid last year about protecting your site images from being hotlinked as I found a site that had word for word scrapped one of my blog posts, you can see the post here, and I really …
Continue reading
I was set a challenge last week to complete a Rubik’s cube after tinkering with one by a colleagues desk and managing to get a complete line of matching colours with little effort. In the past i’ve never fully understood …
Continue reading
I’ve never really got the hang of PHP frameworks and have tended to use my own custom built CMS but even with this I still find myself writing the same code over and over again. In the past I’ve dabbled …
Continue reading
As the title describes we’re going to look at making cross domain ajax requests using JSONP I’m also going to show you how to get data from a MySQL database and encode it into a JSON string which can be …
Continue reading
I’ve had a few pagination scripts over the years but I thought i’d share the one that i’m currently using as it’s a useful script to have in your toolbox. As a developer you’ll soon find a need to paginate …
Continue reading
“Easy PHP Websites with the Zend Framework” shows you how to use the powerful Zend Framework to build websites with amazing speed and efficiency. Embracing a teaching strategy of learning by doing, showing you how to build website features you’ll …
Continue reading
Designer and web developer, Co-founder and Technical Director at Harkable.com London. Previously I worked at InMobi, Spotify and MySpace. Interests include photography and making short videos. Also an avid F1 fan.
Follow us on Twitter and get in-stream updates.
Subscribe to all the Papermashup tutorials and articles straight to your RSS reader.
Sign up and get all the Papermashup tutorials straight to your inbox.