Here’s a selection of really useful PHP code snippets that I find using on a weekly basis. You could use these as is or expand them as part of other applications or add them to a php class. Adjust server …
Continue reading
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
Here’s an interesting code snippet I’ve found handy in past projects. Great for highlighting specific information within an application or web page. To start with lets have a brief explanation as to what we’re going to be doing. We have …
Continue reading
I wrote a post a while back on coding an iPhone style switch using jQuery. I’ve now put together a simple tutorial demonstrating how simple it is to build a switch that triggers two radio buttons in a field set. …
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
Due to popular demand here’s a re-written version of the tutorial I wrote over a year ago on how to show and hide content using jQuery. After I first published the post I’ve had a lot of requests as to …
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
Here’s a very basic example of how to code up an animated progress bar with tooltip using the Tipsy tooltip plugin. First I started out in Photoshop and designed the basic progress bar, you can download the PSD file for …
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
I’ve been hugely inspired recently by the design work of Orman Clark from Premiumpixels.com and his generous selection of top quality PSD downloads. after seeing this beautiful design of a button and slider set I was eager to code up …
Continue reading
With the rise of Facebook and Twitter we’re so used to instantly updating data and being able to judge fresh content almost instantly. Facebook for instance automatically updates how long ago someone left a comment on the fly without even …
Continue reading
Here’s a clever little script that’s certainly useful if you want to give users the functionality to refine search results or filter product results. If you had a list of films with long titles this would be a quick and …
Continue reading
I was browsing forrst.com and saw a pretty interesting code snippet from Chris Coyier from CSS-Tricks which is pretty useful for WordPress users and allows the gravatar of a commenter to be dynamically pulled into the comment box as soon …
Continue reading
Yesterday I looked at Geo Location through your web browser and today we’re going to be looking at using the HTML5 canvas to manipulate the colours on mouseover of a background element. The demo was originally put together by Remy …
Continue reading
HTML5 came on the scene around the beginning of the year, but as we’re seeing more browsers becoming more sophisticated and applications more intelligent how can we use HTML5 to our advantage and what can it do to make life a …
Continue reading
Jay Salvat just posted a brilliant plugin that automatically detects faces in a picture. You can download the code from Git Hub or check out the demo here The plugin is fairly easy to integrate into a social application, all …
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.