Papermashup

Latest Posts


Subscribe


Tweets


"RT @Eva_Shaughnessy: #finedining @romomobilecafes restaurant this evening with #NewHair #winning #SaturdayNight #GirlsNightOut http://t.co/…"

@ashleyford 3 weeks ago

"RT @kycutwilson: @ashleyford @burgerbeartom incredible. There's 5 more left! Shout about it!!"

@ashleyford 1 month ago
Papermashup

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


Introduction to PHP while loops

This is just a quick introduction for beginners getting started with PHP and using while loops. You will quickly find that while loops are used regularly to cycle through specific data. So here’s a little code snippet of a simple while loop in action. Lets run through the code to see whats happening. we start by using a php delimiter [...]

AshleyAshley

Increase a PHP scripts execution time limit

I’m working on a project right now that uses a PHP crontab to run a heavy script, and the problem I faced was the server kept timing out because by default PHP has a time limit for script execution. There’s an easy way around this by adding the following line of code to the top of your php code. It simply overrides the maximum [...]

AshleyAshley

Display your Feedburner stats

I’ve been away for the last week. My wife and I bought a flat in North London and finally moved in on March 16th. So I’m currently without the internet and won’t have it until the end of March which is frustrating when I want to update my blog but simply can’t so please excuse my infrequent posts over the next few weeks. [...]

AshleyAshley

Ipod and Iphone PHP detection

This is a useful script to re-direct Iphone and Ipod users to a specific page. You could use this if your getting a lot of mobile traffic and your current site isn’t optimised for it. Or for branching out and developing a mobile site for your visitors! There’s a bad point to using this right? Sure thing. As a developer you may [...]

AshleyAshley

PHP CURL & Tiny URL

Here’s how to use PHP CURL and the TinyURL api to generate tiny urls on the fly. This is a similar tutorial to the one I wrote a while back on using the Twitter API I’ve set the variable $maketiny as the url that you want to shorten. This then gets passed into the function and processed with CURL. CURLOPT_RETURNTRANSFER returns [...]

AshleyAshley

Prototype page scrolling

I’ve been working on a project over the last few days that uses anchor links to direct the user to specific content on the page, but instead of just clicking the link and page snapping to the content i thought it would be nice for the page to scroll to the specific content. This technique can be achieved using Prototype effects. You [...]

AshleyAshley

Add Gravatars to your wordpress theme

A few days ago I was looking around the internet for a solution on how to add Gravatar avatars to my WordPress comments section, and I found out that its easier than I originally thought! I thought there might be quite a bit of code to implement but found out that it requires just one line of PHP. So here are the steps to adding user Gravatars [...]

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 PHP includes

PHP is a powerful language that has replaced HTML frames and JavaScript includes in performing the task of including code from one page onto another. Generally PHP includes are used for database connection scripts, functions or classes, to be included in dynamic pages. But they can also be used in your static html projects too. This is really [...]

AshleyAshley

Mod rewrite in 10 minutes

Mod rewrite is the best tool to rewrite those long and complicated urls. So what do you need to use mod_rewrite? The only thing you need to get started is make sure that the mod_rewrite module is installed in your Apache server. If your not sure how to find out fear not, copy the code below (make sure you put it between php delimiters) save [...]

AshleyAshley