
	<rss version="2.0">
		<channel>
			<title>paulOr.net</title>
			<description>The blog of Paul Fraser - paulOr.net</description>
			<link>http://www.paulOr.net</link>
			<copyright>(c) Paul Fraser - www.BuiltByEcko.com</copyright>

								<item>
					<title>WordPress Malfunctions</title>
					<pubDate>Mon 23rd Aug 2010</pubDate>
					<description>If for any reason something happens to stop working on your WordPress install which appears to have happened for no damn reason; deactivate all plugins and reactivate one-by-one, checking the site each time one is activated.

99.999999999999999999% of the time its due to shoddy poetry within a plugin.

The exception to the rule is when you have WordPress installed under Magento, oh the rage.

&amp;#60;/advice&amp;#62;</description>
					<link>http://www.paulOr.net/blog/wordpress-malfunctions/</link>
					</item>  
								<item>
					<title>Parsing CSV files with PHP</title>
					<pubDate>Thu 1st Jul 2010</pubDate>
					<description>Today at work I had the amazing job of importing around 50 different artists profiles in to a database - each with about 12 different columns of values in a CSV file.
&lt;br /&gt;
I could copy &amp;amp; paste it from the document - or create a quick little import script... Yea, I made an import script :]
&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;
&amp;lt;?php
	$file_handle = fopen(&quot;file.csv&quot;, &quot;r&quot;);
	while (!feof($file_handle)) {
		$data = fgetcsv($file_handle, 1024);

		## PARSE THE VALUES OF EACH CELL
		## STARTING AT 0 AND WORK YOUR WAY ALONG
		$data[0].'&amp;lt;br /&amp;gt;';
		$data[1].'&amp;lt;br /&amp;gt;';
		$data[2].'&amp;lt;br /&amp;gt;';
		$data[3].'&amp;lt;br /&amp;gt;';

		## AND SO ON...
	}

	fclose($file_handle);
?&amp;gt;
&lt;/pre&gt;</description>
					<link>http://www.paulOr.net/blog/parsing-csv-files-with-php/</link>
					</item>  
								<item>
					<title>Show/Hide Elements w/ jQuery</title>
					<pubDate>Tue 29th Jun 2010</pubDate>
					<description>I'm currently making a site which requires a rollover on an image that will show the images name and a description in a div which appears on hover.
&lt;br /&gt;
Heres how I've done it.
&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;
&amp;#60;!-- JQUERY FROM GOOGLE AND JS UNDER IT --&amp;#62;
&amp;#60;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;&amp;#62;&amp;#60;/script&amp;#62;
&amp;#60;script&amp;#62;
$(document).ready(function() {
	$(&quot;.image_slide&quot;).hover(
		function() { $(this).children('.slide_info').show(); },
		function() { $(this).children('.slide_info').hide(); }
	);
});
&amp;#60;/script&amp;#62;

&amp;#60;!-- HIDE BY DEFAULT WITH CSS :] --&amp;#62;
&amp;#60;style&amp;#62;
.slide_info {
	display: none;
}
&amp;#60;/style&amp;#62;

&amp;#60;!-- HTML ELEMENTS --&amp;#62;
&amp;#60;div class=&quot;image_slide&quot;&amp;#62;
	Image
	&amp;#60;span class=&quot;slide_info&quot;&amp;#62;Image info &amp;amp; Description&amp;#60;/span&amp;#62;  
&amp;#60;/div&amp;#62;
&amp;#60;div class=&quot;image_slide&quot;&amp;#62;
	Image
	&amp;#60;span class=&quot;slide_info&quot;&amp;#62;Image info &amp;amp; Description&amp;#60;/span&amp;#62;  
&amp;#60;/div&amp;#62;
&amp;#60;div class=&quot;image_slide&quot;&amp;#62;
	Image
	&amp;#60;span class=&quot;slide_info&quot;&amp;#62;Image info &amp;amp; Description&amp;#60;/span&amp;#62;  
&amp;#60;/div&amp;#62;
&lt;/pre&gt;</description>
					<link>http://www.paulOr.net/blog/showhide-elements-w-jquery/</link>
					</item>  
								<item>
					<title>Even Ninjas Have Dishes To Do</title>
					<pubDate>Fri 25th Jun 2010</pubDate>
					<description>&lt;object width=&quot;600&quot; height=&quot;525&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/DsxwmruclfY&amp;hl=en_GB&amp;fs=1&amp;border=1&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/DsxwmruclfY&amp;hl=en_GB&amp;fs=1&amp;border=0&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;600&quot; height=&quot;525&quot;&gt;&lt;/embed&gt;&lt;/object&gt;</description>
					<link>http://www.paulOr.net/blog/even-ninjas-have-dishes-to-do/</link>
					</item>  
								<item>
					<title>DailyBooth API: Most Recent Snap</title>
					<pubDate>Wed 23rd Jun 2010</pubDate>
					<description>The &lt;a href=&quot;http://www.dailybooth.com&quot; target=&quot;_blank&quot;&gt;DailyBooth&lt;/a&gt; API is a land yet to be chartered when it comes to developing on it. Its very much still in beta, and &lt;a href=&quot;http://www.dailybooth.com/jon&quot; target=&quot;_blank&quot;&gt;Jon&lt;/a&gt; or &lt;a href=&quot;http://www.dailybooth.com/ryan&quot; target=&quot;_blank&quot;&gt;Ryan&lt;/a&gt; might even shout at me for starting to document into at this stage. But i'm willing to risk it!
&lt;br /&gt;
Overall, DailyBooth API is pretty straight forward and really quite simple, which is great. Ill quickly show you how to grab your most recent snap via the API.
&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;
&amp;#60;?php

	## GET THE USERS USER ID VIA THERE USERNAME
	$userID = json_decode(file_get_contents('http://api.dailybooth.com/v1/user/id/paul.json'));

	## NOW COLLECT THE IMAGES FROM THERE FEED, VIA THERE USERID
	$feed = json_decode(file_get_contents('http://api.dailybooth.com/v1/user/pictures/'.$userID[0].'.json'));

	## PRINT OUT THE IMAGE
	echo '&amp;#60;img src=&quot;'.$feed[0]-&amp;#62;urls-&amp;#62;medium.'&quot; /&amp;#62;';
	

?&amp;#62;
&lt;/pre&gt;
&lt;br /&gt;
More soon, If Jon &amp; Ryan don't go wild at me!</description>
					<link>http://www.paulOr.net/blog/dailybooth-api-most-recent-snap/</link>
					</item>  
								<item>
					<title>Twitter @Anywhere Intergration For Wordpress 3.0</title>
					<pubDate>Fri 18th Jun 2010</pubDate>
					<description>Just playing to try learn more about WordPress as I have taken a drastic disliking to it as of recent, which is probably due to the fact I haven't really given it the time of day so far.
&lt;br /&gt;
This adds javascript to your header that will activate Twitters @Anywhere API stuff and also add hovercards.
&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;
&amp;#60;?php
	/*
	Plugin Name: Twitter @Anywhere
	Description: Add Twitters @Anywhere to Wordpress 3.0
	Version:     0.1
	Author:      Paul Fraser
	Plugin URI:  http://www.paulOr.net
	Author URI:  http://www.paulOr.net
	*/

	function add_twitter_anywhere() {
		echo '&amp;#60;script type=&quot;text/javascript&quot; src=&quot;http://platform.twitter.com/anywhere.js?id=&amp;#60;-- API KEY --&amp;#62;&amp;amp;v=1&quot;&amp;#62;&amp;#60;/script&amp;#62;'.&quot;\n&quot;;
		echo '&amp;#60;script type=&quot;text/javascript&quot;&amp;#62;'.&quot;\n\t&quot;;
		echo 'twttr.anywhere(function(twitter) {'.&quot;\n\t&quot;;
		echo 'twitter.hovercards();'.&quot;\n&quot;;
		echo '});'.&quot;\n&quot;;
		echo '&amp;#60;/script&amp;#62;'.&quot;\n&quot;;
	}

	add_action( 'wp_head', 'add_twitter_anywhere' );
?&amp;#62;
&lt;/pre&gt;
&lt;br /&gt;
Remember and add your API key...</description>
					<link>http://www.paulOr.net/blog/twitter-anywhere-intergration-for-wordpress-30/</link>
					</item>  
								<item>
					<title>CSS Reddit Alien</title>
					<pubDate>Mon 14th Jun 2010</pubDate>
					<description>&lt;img src=&quot;http://paulor.net/inc/uploads/1768aWRY.png&quot; alt=&quot;image&quot; class=&quot;blog-image&quot; /&gt;
&lt;br /&gt;
I give up.
&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;
&amp;#60;style type=&quot;text/css&quot;&amp;#62;
* {
	border: 0px;
	padding: 0px;
	margin: 0px;
}
#wrapper {
	width: 500px;
	margin: 100px auto 20px auto;
}
#head {
	border: 10px solid #000000;
	-moz-border-radius: 1000px;
	min-height: 150px;
	width: 180px;
}
#eye1 {
	background-color: #fc4303;
	border: 10px solid #fc4303;
	width: 10px;
	height: 10px;
	-moz-border-radius: 1000px;
	margin: 40px 0 20px 30px;
	float: left;
}
#eye2 {
	background-color: #fc4303;
	border: 10px solid #fc4303;
	width: 10px;
	height: 10px;
	-moz-border-radius: 1000px;
	margin: 40px 0 20px 60px;
	float: left;
}
#mouth {
	border-bottom: 10px solid #000000;
	border-left: 10px solid #000000;
	border-right: 10px solid #000000;
	-moz-border-radius: 0 0 400px 400px;
	clear: both;
	width: 100px;
	margin: 0 0 0 30px;
	min-height: 15px;
}
#body {
	border-bottom: 10px solid #000000;
	border-left: 10px solid #000000;
	border-right: 10px solid #000000;
	clear: both;
	min-height: 200px;
	width: 130px;
	margin: -25px 0 0 25px;
	-moz-border-radius: 125px 125px 1000px 1000px;
	float: left;
}
#arm1 {
	float: left;
	border-left: 10px solid #000000;
	min-height: 80px;
	-moz-border-radius: 125px 125px 1000px 1000px;
}
&amp;#60;/style&amp;#62;
	&amp;#60;div id=&quot;wrapper&quot;&amp;#62;
		&amp;#60;div id=&quot;ball&quot;&amp;#62;&amp;#60;/div&amp;#62;
		&amp;#60;div id=&quot;bent&quot;&amp;#62;
		&amp;#60;/div&amp;#62;
		&amp;#60;div id=&quot;spike&quot;&amp;#62;
		&amp;#60;/div&amp;#62;
		&amp;#60;div id=&quot;head&quot;&amp;#62;
			&amp;#60;div id=&quot;eye1&quot;&amp;#62;
			&amp;#60;/div&amp;#62;
			&amp;#60;div id=&quot;eye2&quot;&amp;#62;
			&amp;#60;/div&amp;#62;
			&amp;#60;div id=&quot;mouth&quot;&amp;#62;
			&amp;#60;/div&amp;#62;
		&amp;#60;/div&amp;#62;
		&amp;#60;div id=&quot;arm1&quot;&amp;#62;
		&amp;#60;/div&amp;#62;
		&amp;#60;div id=&quot;body&quot;&amp;#62;
		&amp;#60;/div&amp;#62;
		&amp;#60;div id=&quot;arm2&quot;&amp;#62;
		&amp;#60;/div&amp;#62;
	&amp;#60;/div&amp;#62;
&lt;/pre&gt;</description>
					<link>http://www.paulOr.net/blog/css-reddit-alien/</link>
					</item>  
								<item>
					<title>FaceTime? Face Palm More Like...</title>
					<pubDate>Wed 9th Jun 2010</pubDate>
					<description>&lt;img src=&quot;http://paulor.net/inc/uploads/1150n95.png&quot; alt=&quot;image&quot; class=&quot;blog-image&quot; /&gt;

Back in 2007 (the same year as the first iPhone was released) I was sporting a Nokia N95. No one else seems to have picked up on this, so Ill say it, Ill burst the bubble.

My Nokia N95 had a front facing camera which done video calls. Yeah. It did. - Wait. No, yea, it did.

&lt;strong&gt;Quotes from the iPhone 4 promo video:&lt;/strong&gt;
&quot;We're bringing video calling, to the world!&quot; &amp;#60;-- No, no your not, Its been done, Is done, and on a better scale. No wifi? oh well..

&quot;Its going to change the way we communicate, forever.&quot; &amp;#60;-- Wrong.

&quot;The first time i had a facetime call, i was blown away!&quot; &amp;#60;-- Fair enough Scott. You did &lt;strong&gt;make&lt;/strong&gt; it. Your allowed to be impressed by your own work.

&quot;what makes it even better, is it switches from the front camera, to the back camera!&quot; &amp;#60;-- Yea, my 3 year old Nokia N95 STILL does that.

Yea so whatever. Just saying.
Discuss.</description>
					<link>http://www.paulOr.net/blog/facetime-face-palm-more-like/</link>
					</item>  
								<item>
					<title>Function: Convert Days Into Seconds w/ PHP</title>
					<pubDate>Tue 8th Jun 2010</pubDate>
					<description>While making the stats program for the backend of paulOr.net that shows me daily unique &amp; page views in a graph for the past ten days, I needed a really easy way of calculating the amount of seconds in each day so that I could then do quick database querys without much code to grab the total amounts of visiters per day. My solution was this very quick function which converts the amount of days into seconds. 
&lt;br /&gt;
Theres quite a bit more that goes on behind the scenes but this is by far the simpliest form of what goes on. Perhaps others will find it useful also :]
&lt;br /&gt;
&lt;strong&gt;Function: Convert Days To Seconds&lt;/strong&gt;
&lt;pre class=&quot;brush: php&quot;&gt;
&amp;#60;?php

	## DAYS INTO SECONDS
	function days_to_seconds($days) {
		if(is_numeric($days)) {
			return 86400*$days;
		} else {
			return 'string must be numeric';
		}
	}

	## PARSE
	echo days_to_seconds(8); // NUMBER OF DAYS

	## RESULT
	// 691200

?&amp;#62;
&lt;/pre&gt;</description>
					<link>http://www.paulOr.net/blog/function-convert-days-into-seconds-w-php/</link>
					</item>  
								<item>
					<title>Theres An App For That</title>
					<pubDate>Thu 3rd Jun 2010</pubDate>
					<description>&lt;img src=&quot;http://paulor.net/inc/uploads/833iphone.gif&quot; alt=&quot;image&quot; class=&quot;blog-image&quot; /&gt;

I thought I would share the apps I use on my iPhone, if you had just met me and taken a look at my phone, I'm pretty sure from the get-go, you could tell what my profession is, is this accurate for other people too?

In no particular order:

1) &lt;a href=&quot;http://itunes.apple.com/us/app/facebook/id284882215?mt=8&amp;ign-mpt=uo%3D2&quot; target=&quot;_blank&quot;&gt;Facebook&lt;/a&gt;
2) &lt;a href=&quot;http://itunes.apple.com/us/app/twitter/id333903271?mt=8&amp;ign-mpt=uo%3D2&quot; target=&quot;_blank&quot;&gt;Twitter For iPhone&lt;/a&gt;
3) &lt;a href=&quot;http://itunes.apple.com/gb/app/flickr/id328407587?mt=8&quot; target=&quot;_blank&quot;&gt;Flickr&lt;/a&gt; // Photo Upload
4) &lt;a href=&quot;http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=334852412&amp;mt=8&quot; target=&quot;_blank&quot;&gt;RBS&lt;/a&gt; // Mobile Banking
5) &lt;a href=&quot;http://itunes.apple.com/gb/app/touchterm-ssh/id286623227?mt=8&quot; target=&quot;_blank&quot;&gt;TouchTerm&lt;/a&gt; // SSH Client
6) &lt;a href=&quot;http://itunes.apple.com/gb/app/ted/id298728479?mt=8&quot; target=&quot;_blank&quot;&gt;TED&lt;/a&gt; // TED Talks
7) &lt;a href=&quot;http://itunes.apple.com/gb/app/digg/id362872995?mt=8&quot; target=&quot;_blank&quot;&gt;Digg&lt;/a&gt;
8) &lt;a href=&quot;http://itunes.apple.com/gb/app/ireddit/id302732279?mt=8&quot; target=&quot;_blank&quot;&gt;iReddit&lt;/a&gt;
9) &lt;a href=&quot;http://itunes.apple.com/gb/app/zendesk-for-iphone/id368796007?mt=8&quot; target=&quot;_blank&quot;&gt;Zendesk&lt;/a&gt; // Zendesk Help Desk
10) &lt;a href=&quot;http://itunes.apple.com/gb/app/my-o2/id325533754?mt=8&quot; target=&quot;_blank&quot;&gt;My O2&lt;/a&gt; // App to see my phone bill usage
11) &lt;a href=&quot;http://itunes.apple.com/gb/app/domain-scout/id289923007?mt=8&quot; target=&quot;_blank&quot;&gt;Domain Scout&lt;/a&gt; // Domain name availability checker
12) &lt;a href=&quot;http://itunes.apple.com/gb/app/logmein-ignition/id299616801?mt=8&quot; target=&quot;_blank&quot;&gt;LogMeIn Ignition&lt;/a&gt; // Remote Desktop App
13) &lt;a href=&quot;http://itunes.apple.com/gb/app/linode-manager/id352861751?mt=8&quot; target=&quot;_blank&quot;&gt;Linode Manager&lt;/a&gt; // Manage my servers from iPhone
14) &lt;a href=&quot;http://itunes.apple.com/gb/app/control-panel-root-reseller/id336239976?mt=8&quot; target=&quot;_blank&quot;&gt;cPanel Root &amp; Reseller&lt;/a&gt; // Manage cPanel servers
15) &lt;a href=&quot;http://itunes.apple.com/gb/app/control-panel/id339415513?mt=8&quot; target=&quot;_blank&quot;&gt;cPanel&lt;/a&gt; // Manage cPanel user accounts
16) &lt;a href=&quot;http://itunes.apple.com/gb/app/server-status/id298729678?mt=8&quot; target=&quot;_blank&quot;&gt;Server Status&lt;/a&gt; // Server status information
17) &lt;a href=&quot;http://itunes.apple.com/gb/app/analytics-app/id303689911?mt=8&quot; target=&quot;_blank&quot;&gt;Analytics App&lt;/a&gt; // Google Analytics
18) &lt;a href=&quot;http://itunes.apple.com/gb/app/tinygrab/id370922134?mt=8&quot; target=&quot;_blank&quot;&gt;TinyGrab&lt;/a&gt; // Upload images to TinyGrab
and lets not forget, for those long train journeys....
19) &lt;a href=&quot;http://itunes.apple.com/gb/app/solitaire/id284791396?mt=8&quot; target=_blank&quot;&gt;Solitaire&lt;/a&gt;

Please share your apps :)</description>
					<link>http://www.paulOr.net/blog/theres-an-app-for-that/</link>
					</item>  
								<item>
					<title>Crossing The Forth Rail Bridge</title>
					<pubDate>Mon 31st May 2010</pubDate>
					<description>&lt;img src=&quot;http://paulor.net/inc/uploads/8925IMG_0996.jpg&quot; alt=&quot;image&quot; class=&quot;blog-image&quot; /&gt;
I took this epic photo while crossing the Forth Rail Bridge today, looks like I was in some amazingly hot country.</description>
					<link>http://www.paulOr.net/blog/crossing-the-forth-rail-bridge/</link>
					</item>  
								<item>
					<title>Digg v4</title>
					<pubDate>Sat 29th May 2010</pubDate>
					<description>This morning when I woke up, I checked my email (same as every morning really) - There was a message in my inbox from a friends feed on Facebook, it was a link to the new Digg v4 video by Kevin Rose.

I watched the video and right away seen something that looked like a Twitter/Facebook mashup - not the Digg I 'know &amp; love'.

&lt;object width=&quot;600&quot; height=&quot;385&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/Y9rc-Ou6814&amp;hl=en_GB&amp;fs=1&amp;&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/Y9rc-Ou6814&amp;hl=en_GB&amp;fs=1&amp;&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;600&quot; height=&quot;385&quot;&gt;&lt;/embed&gt;&lt;/object&gt;

Oh well, I never thought anymore of it, untill i read &lt;a href=&quot;http://alexisohanian.com/an-open-letter-to-kevin-rose&quot; target=&quot;_blank&quot;&gt;Alexis' thoughts on it&lt;/a&gt;.

Makes sence now.</description>
					<link>http://www.paulOr.net/blog/digg-v4/</link>
					</item>  
								<item>
					<title>Using Google Latitude API w/ Google Maps</title>
					<pubDate>Fri 28th May 2010</pubDate>
					<description>Google, Google, Google eh! I've known about &lt;a href=&quot;http://www.google.com/latitude&quot; target=&quot;_blank&quot;&gt;Google Latitude&lt;/a&gt; for a while now, I've been signed up for ages, just never used it!
&lt;br /&gt;
I decided to take a look the other day and found it pretty nice how it does passive &quot;check-ins&quot;, thats more my style, none of this fourwalla rubbish!
&lt;br /&gt;
Heres an easy way to plot your current location on Google Maps :]
&lt;br /&gt;
Live demo is located &lt;a href=&quot;http://demo.paulor.net/latitude/&quot; target=&quot;_blank&quot;&gt;here :o&lt;/a&gt;
&lt;pre class=&quot;brush: php&quot;&gt;
&amp;#60;?php
	## QUERY STRING
	$latitude = json_decode(file_get_contents('http://www.google.com/latitude/apps/badge/api?user=&amp;#60;-- USER ID --&amp;#62;&amp;type=json'));
	## CURRENT LOCATION
	echo $latitude-&amp;#62;features[0]-&amp;#62;properties-&amp;#62;reverseGeocode;
	## TIME AT LOCATION
	echo $latitude-&amp;#62;features[0]-&amp;#62;properties-&amp;#62;timeStamp;
	## IMAGE URL :]
	echo $latitude-&amp;#62;features[0]-&amp;#62;properties-&amp;#62;placardUrl;

?&amp;#62;
&amp;#60;script src=&quot;http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=true&amp;key=&amp;#60;-- API KEY --&amp;#62;&quot; type=&quot;text/javascript&quot;&amp;#62;&amp;#60;/script&amp;#62;
&amp;#60;script type=&quot;text/javascript&quot; src=&quot;http://paulor.net/inc/uploads/5552mapit.js&quot;&amp;#62;&amp;#60;/script&amp;#62;
&amp;#60;script type=&quot;text/javascript&quot;&amp;#62;
	window.onload = function(){
		var mymap = new MeOnTheMap({
			container: &quot;map&quot;,
			html: &quot;&amp;#60;span id=\&quot;location\&quot;&amp;#62;&amp;#60;?php echo $latitude-&amp;#62;features[0]-&amp;#62;properties-&amp;#62;reverseGeocode; ?&amp;#62;&amp;#60;/span&amp;#62;&amp;#60;br /&amp;#62;&amp;#60;br /&amp;#62;&amp;#60;img src=\&quot;&amp;#60;?php echo $latitude-&amp;#62;features[0]-&amp;#62;properties-&amp;#62;placardUrl; ?&amp;#62;\&quot;/&amp;#62;&quot;,
			address: &quot;&amp;#60;?php echo $latitude-&amp;#62;features[0]-&amp;#62;properties-&amp;#62;reverseGeocode; ?&amp;#62;&quot;,
			zoomLevel: 13
		});
		mymap.adjustMapCenter({
			x: 0,
			y: -80
		});
	}
&amp;#60;/script&amp;#62;
&amp;#60;style&amp;#62;
.map {
    width: 710px;
    height: 300px;
    overflow: hidden;
}
#location {
	display: block;
	background-color: #111111;
	color: #ffffff;
}
&amp;#60;/style&amp;#62;
&amp;#60;div id=&quot;map&quot; class=&quot;map&quot;&amp;#62;&amp;#60;/div&amp;#62;
&lt;/pre&gt;
You will first of all ofcourse have to go sign up to &lt;a href=&quot;http://www.google.com/latitude&quot; target=&quot;_blank&quot;&gt;Google Latitude&lt;/a&gt; aswell as get yourself a nice &lt;a href=&quot;http://code.google.com/apis/maps/signup.html&quot; target=&quot;_blank&quot;&gt;API Key from Google Maps&lt;/a&gt; for your domain name. Once this is done, fill in your User ID in the JSON query string and the API Key in the Google Maps javascript call.
&lt;br /&gt;
&lt;a href=&quot;http://demo.paulor.net/latitude/&quot; target=&quot;_blank&quot;&gt;Take a look at it in action!&lt;/a&gt;</description>
					<link>http://www.paulOr.net/blog/using-google-latitude-api-w-google-maps/</link>
					</item>  
								<item>
					<title>Filler</title>
					<pubDate>Thu 27th May 2010</pubDate>
					<description>I was to busy failing with Magento at work today to do a blog post, and I forgot to pre-write one just incase. So heres Ascii art of a dino!
&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;
					O_
				       /  &amp;#62;
				      -  &amp;#62;   ^\
				     /   &amp;#62;  ^ /   
				    (O)  &amp;#62; ^ /   / / /  
       _____                        |            \\|//
      /  __ \                      _/      /     / _/
     /  /  | |                    /       /     / /
   _/  |___/ /			_/      ------_/ / 
 ==_|  \____/    	      _/       /  ______/
     \   \                 __/           |\
      |   \_          ____/              / \      _                    
       \    \________/                  |\  \----/_V
        \_                              / \_______ V
          \__                /       \ /          V
             \               \        \
              \______         \_       \
                     \__________\_      \ 
                        /    /    \_    | 
                       |   _/       \   |
                      /  _/          \  |
                     |  /            |  |
                     \  \__          |   \__
                     /\____=\       /\_____=\


&lt;/pre&gt;</description>
					<link>http://www.paulOr.net/blog/filler/</link>
					</item>  
								<item>
					<title>Sending Text Messages w/ PHP</title>
					<pubDate>Wed 26th May 2010</pubDate>
					<description>Sending text messages from your web site can be great for security, It would be nice to beable to make a return on it aswell, so your not forking out hundreds of pounds on text messaging, but thats up to you to manage.
&lt;br /&gt;
&lt;a href=&quot;http://www.clickatell.com&quot; target=&quot;_blank&quot;&gt;ClickATell&lt;/a&gt; offer an amazingly simple set of APIs for sending text messages via their network, along with very affordable text messaging bundles.
&lt;br /&gt;
The thing I use text messaging for is again, server monitoring. Whenever a server of mine goes above a certain load level, a text message is fired off to me to alert me. This actually saved the day - on Christmas day - last year, when there was a hard drive failure on a clients server, I got a text at the breakfast table.
&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;
&amp;#60;?php

	## DEFINE ACCOUNT USERNAME &amp; PASSWORD
	$user = '&amp;#60;-- username --&amp;#62;';
	$password = '&amp;#60;-- password --&amp;#62;';

	## DEFINE ACCOUNTS API ID
	$api_id = '&amp;#60;-- api id --&amp;#62;';

	## BASE URL
	$baseurl ='http://api.clickatell.com';

	## MESSAGE TO BE SENT
	$text = urlencode('&amp;#60;-- message to be sent by text --&amp;#62;');

	## PHONE NUMBER TO SEND TO, STARTING WITH COUNTRY CODE (4477425235235)
	$to = '&amp;#60;-- recipients phone number, starting with country code --&amp;#62;';

	$url = $baseurl.'/http/auth?user='.$user.'&amp;password='.$password.'&amp;api_id='.$api_id;
	$ret = file($url);
	$sess = split(':',$ret[0]);
	
	if($sess[0] == 'OK') {

		$sess_id = trim($sess[1]);
		$url = $baseurl.'/http/sendmsg?session_id='.$sess_id.'&amp;to='.$to.'&amp;text='.$text;
		$ret = file($url);
		$send = split(':', $ret[0]);

		if($send[0] == 'ID') {
			echo 'Message Sent';
		} else {
			echo 'Message Failed To Send.';
		}

	} else {
		echo 'Auth failure :/';
		exit();
	}

?&amp;#62;
&lt;/pre&gt;</description>
					<link>http://www.paulOr.net/blog/sending-text-messages-w-php/</link>
					</item>  
								<item>
					<title>Baby Scan!</title>
					<pubDate>Tue 25th May 2010</pubDate>
					<description>&lt;img src=&quot;http://paulor.net/inc/uploads/2733newbaby.jpg&quot; alt=&quot;image&quot; class=&quot;blog-image&quot; /&gt;
We went to get an anomaly scan today! Say hello to baby :]</description>
					<link>http://www.paulOr.net/blog/baby-scan/</link>
					</item>  
								<item>
					<title>Gauging cPanel bandwidth usage w/ Google Charts API</title>
					<pubDate>Mon 24th May 2010</pubDate>
					<description>Following on from &lt;a href=&quot;http://paulor.net/blog/gauging-cpanel-diskspace-usage-w-php-amp-google-charts/&quot;&gt;yesterdays blog post&lt;/a&gt; regarding gauging &lt;a href=&quot;http://www.cpanel.net&quot; target=&quot;_blank&quot;&gt;cPanel&lt;/a&gt; disk space with &lt;a href=&quot;http://code.google.com/apis/charttools/index.html&quot; target=&quot;_blank&quot;&gt;Google Charts API&lt;/a&gt;, we will now replicate this to create the &lt;strong&gt;bandwidth&lt;/strong&gt; meter.
&lt;br /&gt;
To get the disk space usage, we run the &lt;strong&gt;accountsummary&lt;/strong&gt; function and return all the data, this data includes near enough every specific peace of information you would need regarding an account - except for total/average uses... No idea why. I sort of see the point (multiple domains on 1 account) but we should atleast get an overall or an average reading in &lt;strong&gt;accountsummary&lt;/strong&gt;.
&lt;br /&gt;
Anyway, to get bandwidth readings, we do a similar query, this time using the &lt;strong&gt;showbw&lt;/strong&gt; function.
&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;$query = &quot;https://127.0.0.1:2087/json-api/showbw?search=paulor&amp;searchtype=user&quot;;&lt;/pre&gt;
&lt;br /&gt;
This will return a JSON feed containing all my main domain, subdomains, addon domains &amp; parked domains, each with individual bandwidth usage, there is also a TOTAL bandwidth usage and a limit value. Its all pretty self explanitory, so ill just give you the code.
&lt;br /&gt;
&lt;a href=&quot;http://demo.paulor.net/c-panel/bw.php&quot;&gt;Click here for a demo of the bandwidth gauge.&lt;/a&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;
&amp;#60;?php

	## WHM ROOT USER &amp; HASH
	$whmusername = &quot;root&quot;;
	$whmhash = &quot;098A7SDF89AS07DF897ASDF987SD987VXZC897BV98Z7XCV8755
	06ZXC7V908Z7XC9V870X97ZC98V790Z7V9087CV907ZXC7V9ZCV9087ZX987V98
	077ZXCV7ZX8C7V897ZXC8V78ZX7VC87XZC87V89XZ7CV878X9ZC7V8XZ7CV897Z
	08X89CV789XZ7CV897ZXC8V789XCZ7V87ZXC8V798XZ7CV897XZC89V7ZX89C7V
	0989XZ7CV897XZC8V789ZX7VC89Z7XCV87Z89XC7V89Z7XCV8ZX7V987XZVCGFD&quot;;

	## THE QUERY TO THE API
	$query = &quot;https://127.0.0.1:2087/json-api/showbw?search=paulor&amp;searchtype=user&quot;;

	## CRAZY CURL STUFF TO AUTH AND RETURN DATA
	$curl = curl_init();
	curl_setopt($curl, CURLOPT_SSL_VERIFYHOST,0);
	curl_setopt($curl, CURLOPT_SSL_VERIFYPEER,0);
	curl_setopt($curl, CURLOPT_RETURNTRANSFER,1);
	$header[0] = &quot;Authorization: WHM $whmusername:&quot; . preg_replace(&quot;'(\r|\n)'&quot;,&quot;&quot;,$whmhash);
	curl_setopt($curl,CURLOPT_HTTPHEADER,$header);
	curl_setopt($curl, CURLOPT_URL, $query);
	$result = curl_exec($curl);
	if ($result == false) {
		error_log(&quot;curl_exec threw error \&quot;&quot; . curl_error($curl) . &quot;\&quot; for $query&quot;);
	}
	curl_close($curl);

	## COVERT BYTES TO MEGABYTES
	function MBFormat($bytes,$decimals=1) {
		return round($bytes/(1024*1024));
	} 

	## DECODE JSON
	$obj = json_decode($result);

	## ROUND THE DIGITS
	$bw_limit = round(MBFormat($obj-&gt;bandwidth[0]-&gt;acct[0]-&gt;limit)); // LIMIT
	$bw_used = round(MBFormat($obj-&gt;bandwidth[0]-&gt;totalused)); // USED

	echo '&amp;#60;strong&amp;#62;Bandwidth Used:&amp;#60;/strong&amp;#62; '.$bw_used.'MB&amp;#60;br /&amp;#62;';
	echo '&amp;#60;strong&amp;#62;Bandwidth Limit:&amp;#60;/strong&amp;#62; '.$bw_limit.'MB';

	## NOW JAVASCRIPT FROM GOOGLE CHARTS :]
?&gt;

&amp;#60;script type=&quot;text/javascript&quot; src=&quot;http://www.google.com/jsapi&quot;&amp;#62;&amp;#60;/script&amp;#62;
&amp;#60;script type=&quot;text/javascript&quot;&amp;#62;
	google.load('visualization', '1', {packages: ['gauge']});
&amp;#60;/script&amp;#62;
&amp;#60;script type=&quot;text/javascript&quot;&amp;#62;
	var gauge;
	var gaugeData;
	var gaugeOptions;
	function drawGauge() {
		gaugeData = new google.visualization.DataTable();
		gaugeData.addColumn('number', 'B/W Usage');
		gaugeData.addRows(1);
		gaugeData.setCell(0, 0, &amp;#60;?php echo $bw_used; ?&gt;);
		gauge = new google.visualization.Gauge(document.getElementById('gauge'));
		gaugeOptions = {
			min: 100,
			max: &amp;#60;?php echo $bw_limit; ?&gt;,
			yellowFrom: &amp;#60;?php echo ($bw_limit-20000); ?&gt;,
			yellowTo: &amp;#60;?php echo ($bw_limit-10000); ?&gt;,
			redFrom: &amp;#60;?php echo ($bw_limit-10000); ?&gt;,
			redTo: &amp;#60;?php echo ($bw_limit); ?&gt;,
			minorTicks: 10
		};
		gauge.draw(gaugeData, gaugeOptions);
	}

	function changeTemp(dir) {
		gaugeData.setValue(0, 0, gaugeData.getValue(0, 0) + dir * 25);
		gauge.draw(gaugeData, gaugeOptions);
	}
	google.setOnLoadCallback(drawGauge);
&amp;#60;/script&amp;#62;

&amp;#60;div id=&quot;gauge&quot; style=&quot;width: 300px; height: 300px;&quot;&amp;#62;&amp;#60;/div&amp;#62;
&lt;/pre&gt;
&lt;br /&gt;
&lt;a href=&quot;http://demo.paulor.net/c-panel/bw.php&quot;&gt;Click here for a demo of the bandwidth gauge.&lt;/a&gt;</description>
					<link>http://www.paulOr.net/blog/gauging-cpanel-bandwidth-usage-w-google-charts-api/</link>
					</item>  
								<item>
					<title>Gauging cPanel Diskspace Usage w/ PHP &amp;amp; Google Charts</title>
					<pubDate>Sat 22nd May 2010</pubDate>
					<description>Along time ago, I used to be &lt;a href=&quot;http://www.cpanel.net&quot; target=&quot;_blank&quot;&gt;cPanels&lt;/a&gt; #1 fan, after using alternative control panels, that quickly faded due to WHM/cPanels bulky nature. I recently came back to using cPanel, as its the industries #1 control panel &amp; my clients adore it, now, I'm glad I gave it that all important second chance.
&lt;br /&gt;
cPanel is adorable. Its hard &amp; common exterior is found throughout the web, hundreds of thousands of web hosts use, millions of users interact with it each day. Because of this, the folk over at cPanel have created an amazing set of APIs, intelligently structured &amp; a breeze to use.
&lt;br /&gt;
cPanel has an absolutely stunning XML API, its simple, its fast &amp; and opens doors to so much more. I introduce to you, my first (of many) cPanel related tutorial. Showing accounts disk usage, with Google Charts. Lets roll!
&lt;br /&gt;
First of all, for this, you need WHM access, Ill post other user related examples soon, lets start off simple though :]. Login to WHM and go to &lt;strong&gt;Setup Remote Access Key&lt;/strong&gt;. Once you have this massive hash read on.
&lt;br /&gt;
&lt;a href=&quot;http://demo.paulor.net/c-panel/&quot; target=&quot;_blank&quot;&gt;Have a look at what we are making first of all :]&lt;/a&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;&amp;#60;?php

	## ROOT USERNAME AND ACCESS KEY
	$whmusername = &quot;root&quot;;
	$whmhash = &quot;098A7SDF89AS07DF897ASDF987SD987VXZC897BV98Z7XCV87
	ZXC7V908Z7XC9V870X97ZC98V790Z7V9087CV907ZXC7V9ZCV9087ZX987V98
	7ZXCV7ZX8C7V897ZXC8V78ZX7VC87XZC87V89XZ7CV878X9ZC7V8XZ7CV897Z
	X89CV789XZ7CV897ZXC8V789XCZ7V87ZXC8V798XZ7CV897XZC89V7ZX89C7V
	89XZ7CV897XZC8V789ZX7VC89Z7XCV87Z89XC7V89Z7XCV8ZX7V987XZVCGFD&quot;; // ONLY AN EXAMPLE ;)

	## THE QUERY WE ARE SENDING TO THE SERVER
	$query = &quot;https://127.0.0.1:2087/json-api/accountsummary?user=paulor&quot;;

	## CRAZY CURL STUFF TO AUTHENTICATE, CHECK FOR ERRORS AND
	## RETURN OUT JSON ENCODED DATA
	$curl = curl_init();
	curl_setopt($curl, CURLOPT_SSL_VERIFYHOST,0);
	curl_setopt($curl, CURLOPT_SSL_VERIFYPEER,0);
	curl_setopt($curl, CURLOPT_RETURNTRANSFER,1);
	$header[0] = &quot;Authorization: WHM $whmusername:&quot; . preg_replace(&quot;'(\r|\n)'&quot;,&quot;&quot;,$whmhash);
	curl_setopt($curl,CURLOPT_HTTPHEADER,$header);
	curl_setopt($curl, CURLOPT_URL, $query);
	$result = curl_exec($curl);
	if ($result == false) {
		error_log(&quot;curl_exec threw error \&quot;&quot; . curl_error($curl) . &quot;\&quot; for $query&quot;);
	}
	curl_close($curl);

?&amp;#62;&lt;/pre&gt;
&lt;br /&gt;
What we are doing here is connecting to cPanels XMLAPI via cURL, authenticating with the server and then returning any errors, the &lt;strong&gt;$query&lt;/strong&gt; string, is what we are pulling from cPanel, in this case, its near enough all the information that the account with the username 'paulor' has, such as: creation date, plans, disk space, suspended?, ftp accounts, sql accounts, email accounts etc etc etc, what it does lack however, for reasons still unknown to me, is bandwidth usage and limits. Thats a different query alltogether.
&lt;br /&gt;
We query WHM with this query and it returns to us a lovely JSON feed.

&lt;pre class=&quot;brush: php&quot;&gt;&amp;#60;?php

	$obj = json_decode($result);
	$array = $obj-&gt;{'acct'};

	$space_used = str_replace('M', '', $array[0]-&amp;#62;diskused);
	$space_avail = str_replace('M', '', $array[0]-&amp;#62;disklimit);

?&amp;#62;&lt;/pre&gt;
&lt;br /&gt;
First we are decoding the JSON results and then putting the account details into an array, next, because we are making a disk space meter, we don't want the MB (or M in this case) to be attached to the end of the value, so we just chop that off with &lt;a href=&quot;http://www.php.net/str_replace&quot; target=&quot;_blank&quot;&gt;str_replace()&lt;/a&gt;.
&lt;br /&gt;
We are then going to use the &lt;a href=&quot;http://code.google.com/apis/charttools/index.html&quot; target=&quot;_blank&quot;&gt;Google Charts API&lt;/a&gt; to make our gauge and show the results.
&lt;pre class=&quot;brush: php&quot;&gt;
&amp;#60;script type=&quot;text/javascript&quot; src=&quot;http://www.google.com/jsapi&quot;&amp;#62;&amp;#60;/script&amp;#62;
&amp;#60;script type=&quot;text/javascript&quot;&amp;#62;
	google.load('visualization', '1', {packages: ['gauge']});
&amp;#60;/script&amp;#62;
&amp;#60;script type=&quot;text/javascript&quot;&amp;#62;
	var gauge;
	var gaugeData;
	var gaugeOptions;
	function drawGauge() {
		gaugeData = new google.visualization.DataTable();
		gaugeData.addColumn('number', 'Disk Usage');
		gaugeData.addRows(1);
		gaugeData.setCell(0, 0, &amp;#60;?php echo $space_used; ?&amp;#62;);
		gauge = new google.visualization.Gauge(document.getElementById('gauge'));
		gaugeOptions = {
			min: 100,
			max: &amp;#60;?php echo $space_avail; ?&amp;#62;,
			yellowFrom: 300,
			yellowTo: 400,
			redFrom: 400,
			redTo: 500,
			minorTicks: 10
		};
		gauge.draw(gaugeData, gaugeOptions);
	}

	function changeTemp(dir) {
		gaugeData.setValue(0, 0, gaugeData.getValue(0, 0) + dir * 25);
		gauge.draw(gaugeData, gaugeOptions);
	}

	google.setOnLoadCallback(drawGauge);
&amp;#60;/script&amp;#62;
&lt;/pre&gt;
&lt;br /&gt;
Now you can see we have inserted the &lt;strong&gt;$space_used&lt;/strong&gt; &amp; &lt;strong&gt;$space_avail&lt;/strong&gt; variables into the javascript, this is bog standard Google Interactive Charts javascript which you can grab from their website, We then set a div for it to show in.
&lt;pre class=&quot;brush: php&quot;&gt;&amp;#60;div id=&quot;gauge&quot; style=&quot;width: 300px; height: 300px;&quot;&amp;#62;&amp;#60;/div&amp;#62;&lt;/pre&gt;
&lt;br /&gt;
And we have a very sexy gauge to show diskspace usage.
&lt;br /&gt;
&lt;a href=&quot;http://demo.paulor.net/c-panel/&quot; target=&quot;_blank&quot;&gt;You can see a live example here.&lt;/a&gt;
&lt;br /&gt;
Now, isn't that great? What other cPanel API related gizmos would you be interested in?</description>
					<link>http://www.paulOr.net/blog/gauging-cpanel-diskspace-usage-w-php-amp-google-charts/</link>
					</item>  
								<item>
					<title>Capture Visitors Location w/ PHP</title>
					<pubDate>Fri 21st May 2010</pubDate>
					<description>Capturing your visitors location is great for many reasons while building statistical software, its also good just to know where people are that are visiting your website. Heres a quick and dirty way for capturing location data.
&lt;br /&gt;
Download the &lt;a href=&quot;http://paulor.net/inc/uploads/7354ip-to-country.csv.zip&quot; target=&quot;_blank&quot;&gt;IP2Country CSV File&lt;/a&gt; unzip it and fire it into your FTP dir, we need to gather all the data out of it and stick it into a MySQL database.
&lt;br /&gt;
&lt;strong&gt;SQL Table&lt;/strong&gt;
&lt;pre class=&quot;brush: php&quot;&gt;CREATE TABLE `country_ip` (
  `ip_from` DOUBLE NOT NULL ,
  `ip_to` DOUBLE NOT NULL ,
  `country` VARCHAR( 50 ) NOT NULL
) ENGINE = MYISAM&lt;/pre&gt;
Then we create the file that will import all the information.
&lt;pre class=&quot;brush: php&quot;&gt;&amp;#60;?php
$file_arr = file('ip-to-country.csv');
foreach($file_arr as $line){
	$clean_line = trim(str_replace('&quot;', &quot;'&quot;, str_replace(&quot;'&quot;, &quot;\'&quot;, $line)));
	$sql = mysql_query(&quot;INSERT INTO `country_ip` (`ip_from`,`ip_to`,`country`) VALUES($clean_line)&quot;);
}
echo 'Finished :]';
&amp;#62;&gt;&lt;/pre&gt;
&lt;br /&gt;
Once you have ran the above code, it should insert all the data into your mysql database, you can go ahead and delete the ip-to-country.csv file now.
&lt;br /&gt;
Next all we are doing is querying the database to find out the current visitors location, you can then do whatever you like with the data.
&lt;pre class=&quot;brush: php&quot;&gt;&amp;#60;?php
$ip = ip2long($_SERVER['REMOTE_ADDR']);
$ipc_q = mysql_query(&quot;SELECT * FROM `country_ip` WHERE `ip_from` &lt;= '&quot;.$ip.&quot;' AND `ip_to` &gt;= '&quot;.$ip.&quot;'&quot;);
$ipc = mysql_fetch_array($ipc_q);
&amp;#62;&gt;&lt;/pre&gt;
&lt;br /&gt;
When someone visits paulOr.net quite a lot of details are being put into the database regarding each visitor, for example, I work out if the user has been on in the past 24 hours (unique), capture the users IP address, each page visited, visitors country and time/date of visit. From this information, I have created some nice analytical apps in the backend of paulOr.net to feast my eyes upon. </description>
					<link>http://www.paulOr.net/blog/capture-visitors-location-w-php/</link>
					</item>  
								<item>
					<title>Implementing Facebook Connect</title>
					<pubDate>Thu 20th May 2010</pubDate>
					<description>I had quite a struggle getting Facebook Connect working here, mostly due to getting a PHP error which I didn't read before Googling, take it from me, save yourself 2 hours of crying &amp; make sure you have curlSSL compiled on your server (or just ask your host).
&lt;br /&gt;
The first thing to do is head over &lt;a href=&quot;http://developers.facebook.com/setup/&quot; target=&quot;_blank&quot;&gt;Facebook Developers&lt;/a&gt; site and set yourself up a new application, take note of your &lt;strong&gt;App ID&lt;/strong&gt; and &lt;strong&gt;API Secret&lt;/strong&gt; keys, then edit your application making sure to set your callback URLs.
&lt;br /&gt;
You are pretty much ready to go after that, all we need to do now is connect the site to Facebook via the &lt;a href=&quot;http://github.com/facebook/php-sdk&quot; target=&quot;_blank&quot;&gt;Facebook PHP-SDK&lt;/a&gt; written by &lt;a href=&quot;http://github.com/nshah&quot; target=&quot;_blank&quot;&gt;nshah&lt;/a&gt;.
&lt;br /&gt;
Download the SDK and unpack it, go into the src folder and take out &lt;strong&gt;facebook.php&lt;/strong&gt; and pop it into your websites root dir.
&lt;br /&gt;
Now lets start with the code. In your index.php file (or similar) put this code in the head.
&lt;pre class=&quot;brush: php&quot;&gt;&amp;#60;?php
require_once ('facebook.php');
$facebook = new Facebook(array(
	'appId'  =&gt; '&lt;--- APP ID ---&gt;',
	'secret' =&gt; '&lt;--- API SECRET ---&gt;',
	'cookie' =&gt; true,
));

$session = $facebook-&gt;getSession();

$me = null;
if ($session) {
	try {
		$uid = $facebook-&gt;getUser();
		$me = $facebook-&gt;api('/me');
	} catch (FacebookApiException $e) {
		error_log($e);
	}
}
?&amp;#62;&lt;/pre&gt;
We then need some javascript in the &lt;body&gt; (no idea why - else it wont work).
&lt;pre class=&quot;brush: php&quot;&gt;&amp;#60;script type=&quot;text/javascript&quot;&amp;#62;
	window.fbAsyncInit = function() {
		FB.init({
			appId   : '&amp;#60;?php echo $facebook-&gt;getAppId(); ?&amp;#62;',
			session : &amp;#60;?php echo json_encode($session); ?&amp;#62;,
			status  : true,
			cookie  : true,
			xfbml   : true
	});
	FB.Event.subscribe('auth.login', function() {
	window.location.reload();
	});
	};

	(function() {
		var e = document.createElement('script');
		e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
		e.async = true;
		document.getElementById('fb-root').appendChild(e);
	}());
&amp;#60;/script&amp;#62;&lt;/pre&gt;
And now we can start playing. The following code will show a Connect to Facebook button if the user is not logged in, or it will show the users name and profile picture if they are.
&lt;pre class=&quot;brush: php&quot;&gt;&amp;#60;?php
	if($me) {
		echo $me['name'].'&amp;#60;br /&amp;#62;';
		echo '&amp;#60;img src=&quot;https://graph.facebook.com/'.$uid.'/picture&quot; alt=&quot;Facebook&quot; /&amp;#62;';
	} else {
?&amp;#62;

	&amp;#60;fb:login-button v=&quot;2&quot;&amp;#62;&amp;#60;fb:intl&amp;#62;Connect with Facebook&amp;#60;/fb:intl&amp;#62;&amp;#60;/fb:login-button&amp;#62;

&amp;#60;?php
	}
?&amp;#62;&lt;/pre&gt;
And thats about it, you can take it from there and do some crazy stuff. All-in-all its pretty easy to do and is far better / quicker / more reliable than Twitters @anywhere.</description>
					<link>http://www.paulOr.net/blog/implamenting-facebook-connect/</link>
					</item>  
								<item>
					<title>Hello Facebook Connect</title>
					<pubDate>Wed 19th May 2010</pubDate>
					<description>So since launch, I have been using Twitters @anywhere to handle user data, I quickly (on the first round of testing) noticed it was quite slow &amp; also at times just didn't load. A few people also had the same problem, others suggested I ported to Facebook Connect.

Well after a successfull night of doing some house keeping on here, Facebook Connect is now live, I hope this also allows for more people to comment aswell.

&lt;strong&gt;Note:&lt;/strong&gt; When posting comments or wall posts, the only data that i gather is your name &amp; facebook user id, from the user id I can then link to your profile &amp; use the Graph API to snatch your current profile picture. No other data is used, paulOr.net will &lt;strong&gt;NEVER&lt;/strong&gt; post anything on your wall or anything else like that.</description>
					<link>http://www.paulOr.net/blog/hello-facebook-connect/</link>
					</item>  
								<item>
					<title>Showing Server Load As A Graph With PHP</title>
					<pubDate>Wed 19th May 2010</pubDate>
					<description>Along side yesterdays blog post regarding Tweeting out your server status, there are more proactive ways of keeping an eye on whats happening. One of my favorites is showing the server load as a graph/progress bar thing.
&lt;br /&gt;
&lt;a href=&quot;http://demo.paulor.net/serverload/&quot; target=&quot;_blank&quot;&gt;Heres a demo of it working here.&lt;/a&gt;
&lt;br /&gt;
Showing the server load alone is pretty nice, however with a little help from jQuery, we can make it bloody epic! - Showing it in real time.
&lt;br /&gt;
&lt;strong&gt;index.php&lt;/strong&gt;
&lt;pre class=&quot;brush: php&quot;&gt;&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script language=&quot;javascript&quot; src=&quot;http://paulor.net/inc/uploads/3263timer.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
	$(document).ready(function(){
	   var j = jQuery.noConflict();
		j(document).ready(function(){
			j(&quot;.refresh&quot;).everyTime(100,function(i){
				j.ajax({
				  url: &quot;load.php&quot;,
				  cache: false,
				  success: function(html){
					j(&quot;.refresh&quot;).html(html);
				  }
				})
			})
		});
	   j('.refresh').css({color:&quot;black&quot;});
	});
&lt;/script&gt;
&lt;style&gt;
p.load-p {
	font-size: 10px; 
	font-family: Verdana;
	margin: 0;
	padding: 5px 0 0;
}
img.percent {
	background: transparent url(percent1.png) no-repeat scroll 1px 0pt;
	margin: 5px 0pt 0pt;
	padding: 0pt;
}
img.percent.green {
	background-image: url(percent1.png);
}
img.percent.orange {
	background-image: url(percent2.png);
}
img.percent.red {
	background-image: url(percent3.png);
}
&lt;/style&gt;
&lt;div class=&quot;refresh&quot;&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;strong&gt;load.php&lt;/strong&gt;
&lt;pre class=&quot;brush: php&quot;&gt;&amp;#60;?php
preg_match('/([\d]+\.[\d]+), ([\d]+\.[\d]+), ([\d]+\.[\d]+)$/', exec('uptime'), $matches);
$total_width = 121;
list(,$status['one'],$status['five'],$status['fifteen'])=$matches;
foreach ($status as $k=&gt;$int)
	$status_i[$k]=(($int&lt;0.25)?'green':(($int&lt;0.75)?'orange':'red'));
?&amp;#62;
&lt;div id=&quot;serverload&quot;&gt;
	&lt;p class=&quot;load-p&quot;&gt;Current Load: &amp;#60;?=ceil($status['one']*100)?&amp;#62;%&lt;/p&gt;

	&lt;img class=&quot;percent &amp;#60;?=$status_i['one'];?&amp;#62;&quot; style=&quot;background-position: &amp;#60;?=ceil(($status['one']*$total_width)-120)?&amp;#62;px 0pt;&quot; 
	src=&quot;percentImage.png&quot;/&gt;
&lt;/div&gt;&lt;/pre&gt;
&lt;br /&gt;
Very simple, the results however are amazing :]
&lt;br /&gt;
With thanks to &lt;a href=&quot;http://twitter.com/arkinex&quot; target=&quot;_blank&quot;&gt;Arkin&lt;/a&gt; aswell :]</description>
					<link>http://www.paulOr.net/blog/showing-server-load-as-a-graph-with-php/</link>
					</item>  
								<item>
					<title>Server Monitoring via Twiter</title>
					<pubDate>Tue 18th May 2010</pubDate>
					<description>One of my favorite things about Twitter is that its a complete snapshot of everything happen, all at once, in one place.
&lt;br /&gt;
What better tool to use to monitor server loads and uptimes. I created a twitter account for all the servers I look after, its @&lt;a href=&quot;http://twitter.com/eckoservers&quot; target=&quot;_blank&quot; class=&quot;twitter-anywhere-user&quot;&gt;EckoServers&lt;/a&gt; and once every two hours, it spits out information i can use to make sure everything on each server is working perfectly :)
&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;&amp;#60;?php
## QUERY THE SERVER FOR SOME DETAILS
$uptime = system(&quot;uptime&quot;);
$apache = @fsockopen(&quot;localhost&quot;, 80, $errno, $errstr, 30);
$mysql =  @fsockopen(&quot;localhost&quot;, 3306, $errno, $errstr, 30);

## GRAB THE STATS FROM $UPTIME	
preg_match_all('/([\d]+) days.+load average: ([\d].[\d]+), ([\d].[\d]+), ([\d].[\d]+)/', $uptime, $load);

## PING APACHE
if($apache) {
	$apache_status = 'Online';
} else {
	$apache_status = 'Offline';
}

## PING MYSQL
if($mysql) {
	$mysql_status = 'Online';
} else {
	$mysql_status = 'Offline';
}

## OUTPUT
$status = 'Server Name: up '.$load[1][0].' days - Apache: '.$apache_status.' / MySQL: '.$mysql_status.' - Load: '.$load[2][0].', '.$load[3][0].', '.$load[4][0].'.';

## TWEET STATUS
$twitter = 'http://www.twitter.com/statuses/update.xml';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $twitter);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, &quot;status=$status&quot;);
curl_setopt($curl, CURLOPT_USERPWD, &quot;twitter-username:twitter-password&quot;);

$result = curl_exec($curl);
$resultArray = curl_getinfo($curl);

curl_close($curl);
?&amp;#62;&lt;/pre&gt;
&lt;br /&gt;
Sadly, this version doesnt use OAuth or the new Out-Of-Band Authentification method (which is what i think i need to change it to for when they no longer allow basic auth after 30th June 2010).
&lt;br /&gt;
All you need to do is register a new account on twitter, fill in your account name and password and then setup a cronjob to hit it however often you like. Not too often though, as twitter now filters tweets that are similar, I have mine spaced 10 minutes apart every two hours :)
&lt;br /&gt;
&lt;!-- http://twitter.com/EckoServers/status/14220761258 --&gt; &lt;style type='text/css'&gt;.bbpBox14220761258 {background:url(http://s.twimg.com/a/1273694933/images/themes/theme17/bg.gif) #DBE9ED;padding:20px;} p.bbpTweet{background:#fff;padding:10px 12px 10px 12px;margin:0;min-height:48px;color:#000;font-size:18px !important;line-height:22px;-moz-border-radius:5px;-webkit-border-radius:5px} p.bbpTweet span.metadata{display:block;width:100%;clear:both;margin-top:8px;padding-top:12px;height:40px;border-top:1px solid #fff;border-top:1px solid #e6e6e6} p.bbpTweet span.metadata span.author{line-height:19px} p.bbpTweet span.metadata span.author img{float:left;margin:0 7px 0 0px;width:38px;height:38px} p.bbpTweet a:hover{text-decoration:underline}p.bbpTweet span.timestamp{font-size:12px;display:block}&lt;/style&gt; &lt;div class='bbpBox14220761258'&gt;&lt;p class='bbpTweet'&gt;Trixx: up 105 days - Apache: Online / MySQL: Online - Load: 0.04, 0.03, 0.00. &lt;a href=&quot;http://twitter.com/search?q=%23eckostatus&quot; title=&quot;#eckostatus&quot; class=&quot;tweet-url hashtag&quot; rel=&quot;nofollow&quot;&gt;#eckostatus&lt;/a&gt;&lt;span class='timestamp'&gt;&lt;a title='Tue May 18 11:04:56 +0000 2010' href='http://twitter.com/EckoServers/status/14220761258'&gt;less than a minute ago&lt;/a&gt; via &lt;a href=&quot;http://apiwiki.twitter.com/&quot; rel=&quot;nofollow&quot;&gt;API&lt;/a&gt;&lt;/span&gt;&lt;span class='metadata'&gt;&lt;span class='author'&gt;&lt;a href='http://twitter.com/EckoServers'&gt;&lt;img src='http://a1.twimg.com/profile_images/525424460/screen_windows_normal.png' style=&quot;border: 0px;&quot; /&gt;&lt;/a&gt;&lt;strong&gt;&lt;a href='http://twitter.com/EckoServers'&gt;BuiltByEcko Servers&lt;/a&gt;&lt;/strong&gt;&lt;br/&gt;EckoServers&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt; &lt;!-- end of tweet --&gt;</description>
					<link>http://www.paulOr.net/blog/server-monitoring-via-twiter/</link>
					</item>  
								<item>
					<title>Websites that i visit atleast once per day.</title>
					<pubDate>Fri 14th May 2010</pubDate>
					<description>We all have our daily reads such as &lt;a href=&quot;http://www.techcrunch.com&quot; target=&quot;_blank&quot;&gt;TechCrunch&lt;/a&gt; &amp; &lt;a href=&quot;http://www.mashable.com&quot; target=&quot;_blank&quot;&gt;Mashable&lt;/a&gt; but I'm more interested in those not-so-mainstream blogs that people visit each day - which are sometimes the best place to learn amazing things. Heres mine :]

1) &lt;a href=&quot;http://www.techcrunch.com&quot; target=&quot;_blank&quot;&gt;TechCrunch&lt;/a&gt; // Tech news
2) &lt;a href=&quot;http://www.goodphptutorials.com&quot; target=&quot;_blank&quot;&gt;GoodPHPTutorials&lt;/a&gt; // PHP tutorials
3) &lt;a href=&quot;http://davidwalsh.name/&quot; target=&quot;_blank&quot;&gt;David Walsh&lt;/a&gt; // PHP, MooTools &amp; jQuery tutorials
4) &lt;a href=&quot;http://www.9lessons.info/&quot; target=&quot;_blank&quot;&gt;9 Lessons&lt;/a&gt; // PHP &amp; mainly jQuery tutorials
5) &lt;a href=&quot;http://net.tutsplus.com/&quot; target=&quot;_blank&quot;&gt;Nettuts&lt;/a&gt; // All manner of tutorials &amp; walkthroughs
6) &lt;a href=&quot;http://www.forrst.com&quot; target=&quot;_blank&quot;&gt;Forrst&lt;/a&gt; // Designer &amp; Developers share network thingy 
7) &lt;a href=&quot;http://www.gravity.com/&quot; target=&quot;_blank&quot;&gt;Gravity&lt;/a&gt; // Discussion forums, but like never before
8) &lt;a href=&quot;http://www.noupe.com/&quot; target=&quot;_blank&quot;&gt;Noupe&lt;/a&gt; // Tutorials
9) &lt;a href=&quot;http://www.9gag.com&quot; target=&quot;_blank&quot;&gt;9GAG&lt;/a&gt; // Everyday lol's
10) &lt;a href=&quot;http://www.reddit.com/r/php&quot; target=&quot;_blank&quot;&gt;Reddit.com/r/php&lt;/a&gt; // PHP things :]

Those are mine, please share yours :)</description>
					<link>http://www.paulOr.net/blog/websites-that-i-visit-atleast-once-per-day/</link>
					</item>  
								<item>
					<title>Automatic Checkbox Save w/ jQuery</title>
					<pubDate>Fri 14th May 2010</pubDate>
					<description>While making stuff I always try to put in little short cuts to make things go faster, whether its browsing though pages or submitting forms, everything needs sped up.

While making the back-end of a discussion form, I used this to save settings without having to submit a form. It just saves everything onclick :D
&lt;br /&gt;
&lt;strong&gt;PHP/HTML/JS&lt;/strong&gt;
&lt;pre class=&quot;brush: php&quot;&gt;
	## CONNECT TO DATABASE
	$connection = mysql_connect(&quot;localhost&quot;, &quot;username&quot;, &quot;password&quot;); 
	mysql_select_db(&quot;databasename&quot;, $connection); 


&lt;script type=&quot;text/javascript&quot; charset=&quot;utf-8&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;&gt;&lt;/script&gt;

&lt;script type=&quot;text/javascript&quot; charset=&quot;utf-8&quot; src=&quot;http://paulor.net/inc/uploads/7235checkbox.save.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$(document).ready(function() {
$('&lt;img src=&quot;http://paulor.net/inc/uploads/3874ajax-loader.gif&quot; id=&quot;spinner&quot; /&gt;').css('position','absolute').hide().appendTo('body');
	//for every field change
	$('input#crazycheckers').click(function() {
		//get element position
		var position = $(this).offset();
		//position image
		$('#spinner').css({ top: position.top , left: position.left + $(this).width() + 30 }).fadeIn();
		//ajax
		$.post('&lt;?php echo $_SERVER['REQUEST_URI']; ?&gt;',{
			ajax:1,
			value: $(this).val()
		},function() {
			$('#spinner').fadeOut();
		});
	});
});
&lt;/script&gt;


	## GET CURRENT SETTINGS
	$is_q = mysql_query(&quot;SELECT * FROM `settings` WHERE `id` = '1'&quot;);
	$is = mysql_fetch_array($is_q);	

&lt;p&gt;&lt;input type=&quot;checkbox&quot; name=&quot;crazycheckers&quot; id=&quot;crazycheckers&quot; value=&quot;1&quot;&lt;?php if($is['checkbox'] == 1) { echo ' checked=&quot;checked&quot;'; } ?&gt; class=&quot;ajax&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Refresh the page to see that its still checked/unchecked&lt;/p&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;strong&gt;save.php&lt;/strong&gt;
&lt;pre class=&quot;brush: php&quot;&gt;
	## CONNECT TO DATABASE
	$connection = mysql_connect(&quot;localhost&quot;, &quot;username&quot;, &quot;password&quot;); 
	mysql_select_db(&quot;databasename&quot;, $connection); 
	

	if($_GET['checked'] == &quot;true&quot;) {

		mysql_query(&quot;UPDATE `settings` SET `checkbox` = '1' WHERE `id` = '1'&quot;);

	} else {

		mysql_query(&quot;UPDATE `settings` SET `checkbox` = '0' WHERE `id` = '1'&quot;);

	}
&lt;/pre&gt;
&lt;br /&gt;
&lt;strong&gt;The JS&lt;/strong&gt;
&lt;pre class=&quot;brush: php&quot;&gt;$(document).ready(function(){
	$('input#crazycheckers').click(function() {
		$.get(&quot;save.php&quot;, { checked: $(this).attr(&quot;checked&quot;) },
		function(data){
			
		});

	});
});
&lt;/pre&gt;
&lt;br /&gt;
Simples :) &lt;br /&gt;
A little help from &lt;a href=&quot;http://twitter.com/theshaun&quot; target=&quot;_blank&quot;&gt;The Shaun&lt;/a&gt; on this aswell!
&lt;br /&gt;
&lt;a href=&quot;http://demo.paulor.net/checkbox-save/&quot; target=&quot;_blank&quot;&gt;&lt;span class=&quot;demo&quot;&gt;Demo&lt;/span&gt;&lt;/a&gt;</description>
					<link>http://www.paulOr.net/blog/automatic-checkbox-save-w-jquery/</link>
					</item>  
								<item>
					<title>My favourite PHP functions</title>
					<pubDate>Thu 13th May 2010</pubDate>
					<description>I love sharing code &amp; reading other peoples code to grasp a better understanding of how things can be done in different ways. I also like to read other peoples codes to pick-up on the functions they use to get things done.
&lt;br /&gt;
Heres a list of my favourite, starting with a new addition to my fav list!
&lt;br /&gt;
&lt;strong&gt;end()&lt;/strong&gt; - Set the internal pointer of an array to its last element.
&lt;pre class=&quot;brush: php&quot;&gt;$ext = $_FILE['name'];
if(end(explode(&quot;.&quot;, $ext)) == 'jpg') {
// DO THIS
} else {
// DO THIS
}&lt;/pre&gt;
&lt;br /&gt;
&lt;strong&gt;unset()&lt;/strong&gt; - Unset a variable - Good for after forms are submitted, stops people from submitting twice if you have the $_POST['name'] echo'd in the field.
&lt;pre class=&quot;brush: php&quot;&gt;if($_POST) {
// BLAH
unset($_POST['name']);
unset($_POST['message']);
}&lt;/pre&gt;
&lt;br /&gt;
&lt;strong&gt;sort()&lt;/strong&gt; - Sorts the elements of an array in ascending order.
&lt;pre class=&quot;brush: php&quot;&gt;sort($arr);
// a
// b
// j
// l&lt;/pre&gt;
&lt;br /&gt;
&lt;strong&gt;strtolower()&lt;/strong&gt; - Change entire string to lower case.
&lt;pre class=&quot;brush: php&quot;&gt;$str = 'HELLO WORLD';
echo strtolower($str); // hello world&lt;/pre&gt;
&lt;br /&gt;
&lt;strong&gt;str_replace()&lt;/strong&gt; - My all time fav and most used :D
&lt;pre class=&quot;brush: php&quot;&gt;$str = 'Hello little cat!';
echo str_replace('cat!', 'dog!, $str); // Hello little dog!&lt;/pre&gt;
&lt;br /&gt;
&lt;strong&gt;wordwrap()&lt;/strong&gt; - Wrap the string to a given number of characters.
&lt;pre class=&quot;brush: php&quot;&gt;$text = &quot;I am sooo cool!&quot;;
echo wordwrap($text, 8, &quot;\n&quot;, true); // I am so&lt;br /&gt;oo cool!&lt;/pre&gt;
&lt;br /&gt;
Thats all i can remember for now, please share your favourites :)</description>
					<link>http://www.paulOr.net/blog/my-favourite-php-functions/</link>
					</item>  
								<item>
					<title>Grayson97 - Paparazzi Cover</title>
					<pubDate>Wed 12th May 2010</pubDate>
					<description>This popped up on just about every social bookmarking / news / network site that you can think of  today. I wanted to air my thoughts on it.

I wish the music industry would take a far more serious look at websites like YouTube, pruning the utter rubbish and ending with people like this. I hold a grudge paying £12.99 (or whatever it is these days) for albums or even their lesser expensive counter-parts of singles, the main reason being is that what I’m buying isn't a true reflection of the music that is out at that point in time, it’s just music packaged up - which will sell - and sent off to the shops to make its impact (or not) in the charts.

Finding music like this though gives me hope, I’d be quite happy to pay for the flight to his home town and hand over my £12.99 for him to play me 1 song. This boy is epic.

&lt;span class=&quot;blog-vid&quot;&gt;&lt;object width=&quot;480&quot; height=&quot;385&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/bxDlC7YV5is&amp;hl=en_GB&amp;fs=1&amp;&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/bxDlC7YV5is&amp;hl=en_GB&amp;fs=1&amp;&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;480&quot; height=&quot;385&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/span&gt;

&lt;strong&gt;Youtube:&lt;/strong&gt; &lt;a href=&quot;http://www.youtube.com/user/greyson97&quot; target=&quot;_blank&quot;&gt;Grayson97s Youtube Channel&lt;/a&gt;</description>
					<link>http://www.paulOr.net/blog/grayson97---paparazzi-cover/</link>
					</item>  
								<item>
					<title>Setting CSS rules on Wordpress parent elements</title>
					<pubDate>Wed 12th May 2010</pubDate>
					<description>One of the first problems I was faced with when using Wordpress &amp; WooThemes was the fact that you cannot highlight the parent item in the navigation - while on a child page.
&lt;br /&gt;
Alot of designs use breadcrumbs or change the background colour of an elemt to highlight what page you are on, with Wordpress &amp; WooThemes, this isnt built in. Heres how to solve it:
&lt;br /&gt;
&lt;strong&gt;functions/admin-custom-nav.php&lt;/strong&gt;
Around line 1015, you'll see &lt;span style=&quot;font-style: italic;&quot;&gt;// GET MENU ITEMS&lt;/span&gt; - after the backend part, paste in this:
&lt;pre class=&quot;brush: php&quot;&gt;$parentId = null;
if($wp_query-&gt;post-&gt;ID) {
	$parent_res = $wpdb-&gt;get_results(&quot;SELECT post_parent from wp_posts where id = &quot;.$wp_query-&gt;post-&gt;ID);
$	parentId = $parent_res[0]-&gt;post_parent;
}&lt;/pre&gt;

And then further down that page, around line 1160 - Youll see &lt;span style=&quot;font-style: italic;&quot;&gt;// FRONTEND LINKS&lt;/span&gt; in the link anchor, have something like this:
&lt;pre class=&quot;brush: php&quot;&gt;if($woo_custom_nav_menu_items-&gt;post_id == $parentId) { echo 'id=&quot;active&quot;'; }&lt;/pre&gt;

Then all you need to do is set the css rules on #active and your parent elements are styled while on their child pages.
&lt;br /&gt;
This is thanks to &lt;a href=&quot;http://twitter.com/enru&quot;&gt;@enru&lt;/a&gt; aswell :]</description>
					<link>http://www.paulOr.net/blog/setting-css-rules-on-wordpress-parent-elements/</link>
					</item>  
								<item>
					<title>My face is all LOL'd</title>
					<pubDate>Tue 11th May 2010</pubDate>
					<description>&lt;img src=&quot;http://paulor.net/inc/uploads/843332209_1186255315056_1788493572_346653_4412894_n.jpg&quot; alt=&quot;image&quot; class=&quot;blog-image&quot; /&gt;

I went to the dentist this morning to get a tooth taken out, at the sametime i got a little filling in another tooth and the dentist descaled and polished all my teeth. Great job!</description>
					<link>http://www.paulOr.net/blog/my-face-is-all-lold/</link>
					</item>  
								<item>
					<title>Twitter feed for Vanilla Forums</title>
					<pubDate>Mon 10th May 2010</pubDate>
					<description>&lt;pre class=&quot;brush: php&quot;&gt;/*
Extension Name: Twitter Feed
Extension Url: http://lussumo.com/addons/
Description: Show the most recent 5 tweets of your users.
Version: v2
Author: Paul Fraser
Author Url: http://www.paulOr.net
*/

global $Context, $Head;&lt;/pre&gt;

Just over a year ago, i created a an addon for @VanillaForums - The very simple &amp; open source community forum software.

Its had quite alot of good feed back and also been &lt;a href=&quot;http://vanillaforums.org/addon/447/twitter-feed&quot; target=&quot;_blank&quot;&gt;downloaded nearly 1000 times&lt;/a&gt;, which is pretty good for my first attempt at a Vanilla addon.</description>
					<link>http://www.paulOr.net/blog/twitter-feed-for-vanilla-forums/</link>
					</item>  
								<item>
					<title>Delete file in FTP via PHP</title>
					<pubDate>Sun 9th May 2010</pubDate>
					<description>I hated the days of old when i use to just leave old unused files that had been uploaded lying around the FTP. This really nice bit of code will allow you to delete a file from your FTP. I use it along side deleting the records from the database.

&lt;pre class=&quot;brush: php&quot;&gt;$ftp_con = ftp_connect('ftp.hostname.com');
ftp_login($ftp_con,'username','password');
ftp_delete($ftp_con,'/path/to/file.extension');
ftp_close($ftp_con);&lt;/pre&gt;</description>
					<link>http://www.paulOr.net/blog/delete-file-in-ftp-via-php/</link>
					</item>  
								<item>
					<title>Forcing www or non www</title>
					<pubDate>Sat 8th May 2010</pubDate>
					<description>The @anywhere callback on Twitters API can be slightly temperamental depending on whether or not you have defined www. in your application settings. For this reason, its best to ensure your users always get to the correct callback url using .htaccess.

&lt;pre class=&quot;brush: php&quot;&gt;## FORCE NON-WWW
RewriteCond %{HTTP_HOST} ^www\.paulor\.net [NC]
RewriteRule (.*) http://paulor.net/$1 [R=301,L]

## FORCE WWW
RewriteCond %{HTTP_HOST} !^www\.paulor\.net
RewriteRule (.*) http://www.paulor.net/$1 [R=301,L]&lt;/pre&gt;

Remembering to switch on the RewriteEngine of course :)</description>
					<link>http://www.paulOr.net/blog/forcing-www-or-non-www/</link>
					</item>  
								<item>
					<title>Google Analytics</title>
					<pubDate>Thu 6th May 2010</pubDate>
					<description>&lt;img src=&quot;http://paulor.net/inc/uploads/5136pic.gif&quot; alt=&quot;image&quot; class=&quot;blog-image&quot; /&gt;

Teaching Sam about Google Analytics :] YAY</description>
					<link>http://www.paulOr.net/blog/google-analytics/</link>
					</item>  
								<item>
					<title>@g4nd Doing A Bungee Jump</title>
					<pubDate>Sun 21st Jun 2009</pubDate>
					<description>This is @g4nd doing a bungee jump for charity. Happy Days!
&lt;br /&gt;
&lt;object width=&quot;600&quot; height=&quot;385&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/7pDi_T3mfoA&amp;hl=en_GB&amp;fs=1&amp;&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/7pDi_T3mfoA&amp;hl=en_GB&amp;fs=1&amp;&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;600&quot; height=&quot;385&quot;&gt;&lt;/embed&gt;&lt;/object&gt;</description>
					<link>http://www.paulOr.net/blog/bungee-jump/</link>
					</item>  
			  

		</channel>
	</rss>

