Papermashup

Latest Posts


Subscribe


Tweets


"@neilhewitt Good stuff, keep your self well mate! Hope you feel better soon."

@ashleyford 5 days ago

"@neilhewitt Cranberry Juice works well for that"

@ashleyford 5 days ago
Papermashup

Web design and development tutorials, scripts and downloads designed for beginners right through to advanced developers


Regular Expression6

jQuery dynamic number ticker

This is a fascinating little script that helps you display a dynamic JSON feed of numbers that automatically updates on the page by animating up or down to the current number. A great addition as part of a realtime analytical dashboard. The Code There are three functions in total. The first one ‘format_number’ which works the same [...]

AshleyAshley

Useful .htaccess techniques

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 wanted to go back to this and run over a few more things the .htaccess file is useful for. I mainly use the .htaccess file to rewrite URIs for example [...]

AshleyAshley

Read URL GET variables with JavaScript

I had the need to read a URL GET variable and complete an action based on the url parameter. I searched high and low for a solution and came across this little piece of code on Snipplr. It basically reads the current page url, perform some regular expression on the URL then saves the url parameters in an associative array, which we can easily [...]

AshleyAshley

PHP form validation

When building a simple form, validation is usually neglected leaving us open to malicious attacks or genuine user error. filter_var is a built in function to PHP 5 that allows you to strip out any unwanted characters and also makes sure that the data is in the right format i.e. you can check to see if a users email address is in fact a valid [...]

AshleyAshley

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 [...]

AshleyAshley

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 [...]

AshleyAshley