Category Archives: Code Share

Any code that I have built on a project or have played about with!

Generating a Leaderboard with Ranking for MySQL

Using MySQL derived queries to generate a fully functional leaderboard. Continue reading

Filed Under: Blog, Code Share
Tags: , , ,

Track Social Widget Events Using Google Analytics

There is a time when you are building your website that will need to track a users social share activity. Whether it be a Google Analytics event or you just want to be able to increment a count in your database. Continue reading

Filed Under: Code Share, Events, Social

Retrieving a YouTube video id from Embed Code using Javascript and PHP

I have been working on a project and came across a feature in my website that would need to take YouTube embed code or even a url and extract the video id for storage in a database. Continue reading

Filed Under: Blog, Code Share
Tags: , , , , , ,

Sanitising variables to avoid XSS (Cross Site Scripting) attacks using PHP

Shows a developer how to handle their variables safely and securely using a helpful validation script. Continue reading

Filed Under: Blog, Code Share, Security
Tags: , , , , , , , , ,

Using the Amazon S3 Service and PHP

Takes you through how to manipulate and transfer image files to the Amazon S3 service without the need to write files to your server. Continue reading

Filed Under: Blog, Code Share, Media
Tags: , , , ,

Emulating Facebook’s Dialogue Using Jquery UI Dialogues

When working on applications for Facebook one thing that I really wanted to be able to do is to have more control over the javascript dialogues to display our content to the user. Continue reading

Filed Under: Blog, Code Share, Social
Tags: , , , ,

Integrating Twitter search into your WordPress blog

Recently we had to add a Twitter stream to one of our Facebook tabs for a campaign. I thought I would share with you php code that uses a short code in your Wordpress post and dynamically creates a twitter search panel based on a search term you specify. Continue reading

Filed Under: Blog, Code Share, Social, Wordpress
Tags: , , , ,

Image Resizing With PHP – EXIF Orientation Fix

I have been working on a project recently that has incorporated an upload mechanic for images uploaded to our website. The images are then resized into a dimension box that I pass to a function. This then builds out these images from the original uploaded. Continue reading

Filed Under: Blog, Code Share
Tags: , , , , , ,

Extending Ian Selby’s RESTful API in PHP – Part 2

This blog post follows on from Extending Ian Selby’s RESTful API in PHP – Part 1 and will talk about how to add security to your selected API calls. Continue reading

Filed Under: Blog, Code Share
Tags: , , , , , , , , , , ,

Extending Ian Selby’s RESTful API in PHP – Part 1

On a recent project which can be found here I was tasked to build an API so that a series of applications could make calls and log achievements into a centralised database from several locations. Continue reading

Filed Under: Blog, Code Share
Tags: , , , , , , , ,