Adding a Facebook Status Feed to Your Website With PHP

If you would like to add your latest Facebook wall post feed to your website, you will probably have noticed that there isn't a widget available like there is with Twitter. This short tutorial will show you how you can add a feed using Facebook's Open Graph Protocol. We will also be caching the feed to increase page load times, avoiding the call to facebook for every page load.

Up until a few days ago, this was a lot more straight forward, however...you now require an access token otherwise the json will display an error message.

So here goes...

Firstly create a folder named 'cache' and create an empty file inside it called cachefile.json. This is where we will be storing the feed locally. Make sure the folder and file are writable.

//set your cache file path as a variable
$cachefile = …

Google Dropping Support of Old Browsers

At last! One of the web giants is helping rid the world of those awful old browsers to help pave the way for more feature rich web browsing. From August 1st 2011, Google is planning to drop support for all browsers that are three versions old or more.

Web designers have been pulling their hair out because of the likes of Internet Explorer 6 still requiring support, but now it looks like google will be ignoring that browser and Internet Explorer 7 as well! This is fantastic news, as it will force a lot of people to upgrade to the latest versions meaning that websites can improve in functionality, security and compatibility.

Obviously there are some people that don't use google (honest!) but hopefully some of the other internet giants such as Facebook, Twitter, Yahoo and Bing will take on this kind of strategy. …

Simple Guide to Web Hosting and Domains: What are they?

Are you often confused when designers and developers mention servers, hosting and domain names? If the answer is 'yes', then this article is for you! I will break down the basics of what goes on to get a website on your screen at home.

Why Do I Need Hosting?

A hosting server is the computer and hard drive space where your website files are stored, continuously connected to the internet and freely available for internet users to view in their web browsers.

Why Do I Need A Domain Name?

The domain name is the address which tells the web browser which hosting server to connect to in order to load your website. Technically, you don't need a domain name to load your website, but without one, it would be very difficult for people to be able to remember the address of your website and it may change …

Upload a PDF and Create Thumbnail Image in PHP

If you want to be able to upload .pdf files to your website and display an image thumbnail of the first page instead of a text link, this should cover the basics of how to achieve just that.

You will require Ghostscript and ImageMagick to be installed on your server - most linux hosting packages already have these installed.

Create a Simple Upload Form

First we need a simple upload for to upload our pdf document:

<form method="post" action="" enctype="multipart/form-data">
	<input type="file" name="pdf" />
	<input type="submit" name="submit" value="Upload" />
</form>
Target Directories

Create a folder to store your uploaded pdf file and name it "pdf". Now create a folder to store your …

CSS: Clearing Floats in All Browsers

Floated elements have always caused problems with web developers due to the way they are handled in different browsers...mainly Internet Explorer causing the most trouble. There are a few ways that people have used over the years so I thought I would share my experiences with them and show the one that I have found to be the most efficient.

The clearing div method is possibly the worst one I have come across, and although it does work, I have never used it because it is just unnecessary and bad form! It involves adding an empty div to force the bottom of the wrapper past the floated div and clear any content:

<div id="wrapper">
     <div id="floated-div">
        <p>Some content in here</p>
     </div>
     <div …

New Cookie Regulations in the UK

The Information Commissioner's Office are to set a new law starting from the 26th May 2011 which adds a lot of restrictions on the use of cookies on your website. They have been very sketchy on the level of compliance or how it will be policed. (direct link to the pdf document at ico.org.uk)

At the moment, if your site uses cookies, you are required to have a privacy policy stating that you use them, what information you collect and how you use it, along with a notification that you can disable them within your browser. The new law is requesting that if you use cookies, you have to get the site visitor to physically agree to allow you to use them before setting the cookie. ICO have given one exception to the rule:

"The only exception to this rule is if what you are doing is ‘strictly …

Understanding Email: It’s Not Always Your Host's Fault

A lot of people are often confused about email accounts and how they relate to their email client (Microsoft Outlook, Thunderbird, Windows Live Mail etc...) which they have on their computer. Because of this, a lot of web hosts and email hosts are contacted for support when things go wrong and it really has nothing to do with them. I am going to briefly explain the relationship between the two to help people to better understand what is going on.

If you have an email account with your web host, or any email host for that matter, you will most likely have a web based login where you can access your email account. This would be accessed directly from a web page, where you would enter your email address and password to log in and view your emails. A lot of people have email client software installed on their computers, e.g. …

moo.com business card printing

What's All This About?

Deanblog is a collection of articles written by Dean Morgan from Deanzod Limited. The aim of the site is to provide helpful information for everyone from web designers & developers right through to website owners. I will try and keep a good balance of information such as php/mySQL tutorials, html/css tutorials along with marketing ideas and advice for website owners.

If You Like The Blog, Spread The Love!

Or If You Use Networked Blogs...