<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Matthew Byrne: the blog &#187; Open source</title>
	<atom:link href="http://www.matthewbyrne.co.uk/tag/open-source/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.matthewbyrne.co.uk</link>
	<description>copywriter / producer / blogger</description>
	<lastBuildDate>Sun, 03 May 2009 20:06:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Open Street Map 2008: A year of edits</title>
		<link>http://www.matthewbyrne.co.uk/news/open-street-map-2008-a-year-of-edits/</link>
		<comments>http://www.matthewbyrne.co.uk/news/open-street-map-2008-a-year-of-edits/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 08:05:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[MiniBar]]></category>
		<category><![CDATA[Open source]]></category>
		<category><![CDATA[Open Street Map]]></category>
		<category><![CDATA[Ordinance Survey]]></category>
		<category><![CDATA[OSM]]></category>

		<guid isPermaLink="false">http://www.matthewbyrne.co.uk/?p=192</guid>
		<description><![CDATA[This fantastic animation was presented at Minibar last Friday. Looks like OSM are really starting to give Ordinance Survey a run for their money. Ordinance Survey holds much more accurate geo-data, so this crowd sourced data set wont destroy their entire business. However, they do need to act fast if they want to stay in [...]]]></description>
			<content:encoded><![CDATA[<p>This fantastic animation was presented at Minibar last Friday. Looks like OSM are really starting to give Ordinance Survey a run for their money. </p>
<p>Ordinance Survey holds much more accurate geo-data, so this crowd sourced data set wont destroy their entire business. However, they do need to act fast if they want to stay in the bigger picture as many applications like Sat Nav don&#8217;t need millimeter perfect maps &#8211; near enough is good enough.</p>
<p>I really hope they can adapt their business model as 300 years of history is a terrible thing to waste.</p>
<p><object width="400" height="225"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=2598878&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=2598878&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="225"></embed></object><br /><a href="http://vimeo.com/2598878">OSM 2008: A Year of Edits</a> from <a href="http://vimeo.com/itoworld">ItoWorld</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<!-- Social Bookmarking Reloaded BEGIN --><div class="social_bookmark"><em> </em><br /><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.matthewbyrne.co.uk/news/open-street-map-2008-a-year-of-edits/&amp;title=Open+Street+Map+2008%3A+A+year+of+edits" title="Add 'Open Street Map 2008: A year of edits' to Del.icio.us"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/delicious.png" title="Add 'Open Street Map 2008: A year of edits' to Del.icio.us" alt="Add 'Open Street Map 2008: A year of edits' to Del.icio.us" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.matthewbyrne.co.uk/news/open-street-map-2008-a-year-of-edits/&amp;title=Open+Street+Map+2008%3A+A+year+of+edits" title="Add 'Open Street Map 2008: A year of edits' to digg"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/digg.png" title="Add 'Open Street Map 2008: A year of edits' to digg" alt="Add 'Open Street Map 2008: A year of edits' to digg" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://furl.net/storeIt.jsp?t=Open+Street+Map+2008%3A+A+year+of+edits&amp;u=http://www.matthewbyrne.co.uk/news/open-street-map-2008-a-year-of-edits/" title="Add 'Open Street Map 2008: A year of edits' to FURL"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/furl.png" title="Add 'Open Street Map 2008: A year of edits' to FURL" alt="Add 'Open Street Map 2008: A year of edits' to FURL" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.matthewbyrne.co.uk/news/open-street-map-2008-a-year-of-edits/&amp;title=Open+Street+Map+2008%3A+A+year+of+edits" title="Add 'Open Street Map 2008: A year of edits' to reddit"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/reddit.png" title="Add 'Open Street Map 2008: A year of edits' to reddit" alt="Add 'Open Street Map 2008: A year of edits' to reddit" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.matthewbyrne.co.uk/news/open-street-map-2008-a-year-of-edits/" title="Add 'Open Street Map 2008: A year of edits' to Technorati"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/technorati.png" title="Add 'Open Street Map 2008: A year of edits' to Technorati" alt="Add 'Open Street Map 2008: A year of edits' to Technorati" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.newsvine.com/_wine/save?u=http://www.matthewbyrne.co.uk/news/open-street-map-2008-a-year-of-edits/&amp;h=Open+Street+Map+2008%3A+A+year+of+edits" title="Add 'Open Street Map 2008: A year of edits' to Newsvine"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/newsvine.png" title="Add 'Open Street Map 2008: A year of edits' to Newsvine" alt="Add 'Open Street Map 2008: A year of edits' to Newsvine" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://ma.gnolia.com/bookmarklet/add?url=http://www.matthewbyrne.co.uk/news/open-street-map-2008-a-year-of-edits/&amp;title=Open+Street+Map+2008%3A+A+year+of+edits&amp;description=Open+Street+Map+2008%3A+A+year+of+edits" title="Add 'Open Street Map 2008: A year of edits' to Ma.gnolia"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/magnolia.png" title="Add 'Open Street Map 2008: A year of edits' to Ma.gnolia" alt="Add 'Open Street Map 2008: A year of edits' to Ma.gnolia" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://www.matthewbyrne.co.uk/news/open-street-map-2008-a-year-of-edits/&amp;title=Open+Street+Map+2008%3A+A+year+of+edits" title="Add 'Open Street Map 2008: A year of edits' to Stumble Upon"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/stumbleupon.png" title="Add 'Open Street Map 2008: A year of edits' to Stumble Upon" alt="Add 'Open Street Map 2008: A year of edits' to Stumble Upon" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://www.matthewbyrne.co.uk/news/open-street-map-2008-a-year-of-edits/&amp;t=Open+Street+Map+2008%3A+A+year+of+edits" title="Add 'Open Street Map 2008: A year of edits' to FaceBook"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/facebook.png" title="Add 'Open Street Map 2008: A year of edits' to FaceBook" alt="Add 'Open Street Map 2008: A year of edits' to FaceBook" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://www.matthewbyrne.co.uk/news/open-street-map-2008-a-year-of-edits/" title="Add 'Open Street Map 2008: A year of edits' to Twitter"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/twitter.png" title="Add 'Open Street Map 2008: A year of edits' to Twitter" alt="Add 'Open Street Map 2008: A year of edits' to Twitter" /></a></div>
<!-- Social Bookmarking Reloaded END -->]]></content:encoded>
			<wfw:commentRss>http://www.matthewbyrne.co.uk/news/open-street-map-2008-a-year-of-edits/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The SEO experiment &#8211; Part 2 Google Rank graphic</title>
		<link>http://www.matthewbyrne.co.uk/seo/the-seo-experiment-part-2-google-rank-graphic/</link>
		<comments>http://www.matthewbyrne.co.uk/seo/the-seo-experiment-part-2-google-rank-graphic/#comments</comments>
		<pubDate>Sun, 17 Aug 2008 17:26:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[cron job]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Rank]]></category>
		<category><![CDATA[Google Rank graphic]]></category>
		<category><![CDATA[Open source]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php graphic]]></category>
		<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://www.matthewbyrne.co.uk/?p=59</guid>
		<description><![CDATA[A sites position on Google work like this: Position = Relevance of content * Google Rank So, knowing my current Google rank is going to be handy. There are a bunch of different ways to discover a sites rank from the Google Toolbar, to a million and one websites. As I want to chart the [...]]]></description>
			<content:encoded><![CDATA[<p>A sites position on Google work like this:</p>
<p><strong>Position = Relevance of content * Google Rank</strong></p>
<p>So, knowing my current Google rank is going to be handy. There are a bunch of different ways to discover a sites rank from the Google Toolbar, to a million and one websites. As I want to chart the progress of this site I also need a way to periodically record my results.</p>
<p>I need the following components: a script to periodically measure Page Rank, a database to store the results, and a script to chart the results.</p>
<h3>Page Rank Script</h3>
<p>After a quick search I came across a great <a href="http://programmabilities.com/php/?id=36">Open Source Google Rank script</a>. This script returns code for a graphic so I rewrote the function pr_image($pagerank) to return a number instead.</p>
<h3>The Cron job</h3>
<p>I set up a Cron Job to periodically call the following script. (This script is placed outside the html directory for security).</p>
<pre>
&#60;?php
//Connect to the database
include 'connect.php';

//Include the Page Rank script
include("pagerank.php");

$today = date("Y-m-d");

//Discover the current Page Rank
$gpr= new pageRank();
$gpr-&#62;printrank("http://www.matthewbyrne.co.uk");
$pageRank = $gpr-&#62;get_pr();

// Insert a row of information into the table
mysql_query("INSERT INTO googlePR (theDate, rank) VALUES('$today','$pageRank' ) ") or die(mysql_error()); 

//We've finished with the database, so close the connection
mysql_close($conn);

?&#62;
</pre>
<h3>Charting the results</h3>
<p>The results are displayed live in chart (to the right). This script still needs a bit of work, as it will run off the edge of the graphic after a couple of months, but for now does the job just fine. Also, it looks a lot nicer when the bars are not all zero, so I&#8217;m keeping my finger crossed that Google moves me up a rank or too.</p>
<pre>
&#60;?php
//Connect to the database
include 'connect.php';

//set up image
$height = 120;
$img = ImageCreate(230,$height);
$white = ImageColorAllocate($img,0xFF,0xFF,0xFF);
$black = ImageColorAllocate($img,0x00,0x00,0x00);
$blue = ImageColorAllocate($img,0x14,0x8A,0xD6);
$grey = ImageColorAllocate($img,0xCC,0xCC,0xCC);

//Query databasebase
$query= "SELECT * FROM googlePR_MB";
$data = mysql_query("SELECT * FROM googlePR_MB")
or die(mysql_error()); 

//Build array
$results = array();
while($info = mysql_fetch_array( $data )){
	$reformatDate=date('d M',strtotime($info['theDate']));
	array_push($results, array($reformatDate,$info['rank']));
}
//We've finished with the database, so close the connection
//mysql_close($conn);

$resultCount = count($results);

//Generate bars
for ($i=0;$i&#60;=$resultCount;$i++){
	imageFilledRectangle($img,20+(5*$i),($height-1)-($results[$i][1]*10),20+(5*$i)+3,$height,$blue);
}

//Generate y-scale
for ($j=0;$j&#60;10;$j++){
	ImageString($img,1,8,$height-(10*$j), $j,$grey);
}
//Add titles
ImageString($img,1,20,0,"Google Rank for www.matthewbyrne.co.uk", $black);
ImageString($img,1,20,10, $results[0][0]." - ".$results[$resultCount-1][0],$black);

//Output graphic
header('Content-Type: image/png');
ImagePNG($img);
?&#62;
</pre>
<!-- Social Bookmarking Reloaded BEGIN --><div class="social_bookmark"><em> </em><br /><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.matthewbyrne.co.uk/seo/the-seo-experiment-part-2-google-rank-graphic/&amp;title=The+SEO+experiment+%26%238211%3B+Part+2+Google+Rank+graphic" title="Add 'The SEO experiment &#8211; Part 2 Google Rank graphic' to Del.icio.us"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/delicious.png" title="Add 'The SEO experiment &#8211; Part 2 Google Rank graphic' to Del.icio.us" alt="Add 'The SEO experiment &#8211; Part 2 Google Rank graphic' to Del.icio.us" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.matthewbyrne.co.uk/seo/the-seo-experiment-part-2-google-rank-graphic/&amp;title=The+SEO+experiment+%26%238211%3B+Part+2+Google+Rank+graphic" title="Add 'The SEO experiment &#8211; Part 2 Google Rank graphic' to digg"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/digg.png" title="Add 'The SEO experiment &#8211; Part 2 Google Rank graphic' to digg" alt="Add 'The SEO experiment &#8211; Part 2 Google Rank graphic' to digg" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://furl.net/storeIt.jsp?t=The+SEO+experiment+%26%238211%3B+Part+2+Google+Rank+graphic&amp;u=http://www.matthewbyrne.co.uk/seo/the-seo-experiment-part-2-google-rank-graphic/" title="Add 'The SEO experiment &#8211; Part 2 Google Rank graphic' to FURL"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/furl.png" title="Add 'The SEO experiment &#8211; Part 2 Google Rank graphic' to FURL" alt="Add 'The SEO experiment &#8211; Part 2 Google Rank graphic' to FURL" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.matthewbyrne.co.uk/seo/the-seo-experiment-part-2-google-rank-graphic/&amp;title=The+SEO+experiment+%26%238211%3B+Part+2+Google+Rank+graphic" title="Add 'The SEO experiment &#8211; Part 2 Google Rank graphic' to reddit"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/reddit.png" title="Add 'The SEO experiment &#8211; Part 2 Google Rank graphic' to reddit" alt="Add 'The SEO experiment &#8211; Part 2 Google Rank graphic' to reddit" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.matthewbyrne.co.uk/seo/the-seo-experiment-part-2-google-rank-graphic/" title="Add 'The SEO experiment &#8211; Part 2 Google Rank graphic' to Technorati"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/technorati.png" title="Add 'The SEO experiment &#8211; Part 2 Google Rank graphic' to Technorati" alt="Add 'The SEO experiment &#8211; Part 2 Google Rank graphic' to Technorati" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.newsvine.com/_wine/save?u=http://www.matthewbyrne.co.uk/seo/the-seo-experiment-part-2-google-rank-graphic/&amp;h=The+SEO+experiment+%26%238211%3B+Part+2+Google+Rank+graphic" title="Add 'The SEO experiment &#8211; Part 2 Google Rank graphic' to Newsvine"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/newsvine.png" title="Add 'The SEO experiment &#8211; Part 2 Google Rank graphic' to Newsvine" alt="Add 'The SEO experiment &#8211; Part 2 Google Rank graphic' to Newsvine" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://ma.gnolia.com/bookmarklet/add?url=http://www.matthewbyrne.co.uk/seo/the-seo-experiment-part-2-google-rank-graphic/&amp;title=The+SEO+experiment+%26%238211%3B+Part+2+Google+Rank+graphic&amp;description=The+SEO+experiment+%26%238211%3B+Part+2+Google+Rank+graphic" title="Add 'The SEO experiment &#8211; Part 2 Google Rank graphic' to Ma.gnolia"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/magnolia.png" title="Add 'The SEO experiment &#8211; Part 2 Google Rank graphic' to Ma.gnolia" alt="Add 'The SEO experiment &#8211; Part 2 Google Rank graphic' to Ma.gnolia" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://www.matthewbyrne.co.uk/seo/the-seo-experiment-part-2-google-rank-graphic/&amp;title=The+SEO+experiment+%26%238211%3B+Part+2+Google+Rank+graphic" title="Add 'The SEO experiment &#8211; Part 2 Google Rank graphic' to Stumble Upon"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/stumbleupon.png" title="Add 'The SEO experiment &#8211; Part 2 Google Rank graphic' to Stumble Upon" alt="Add 'The SEO experiment &#8211; Part 2 Google Rank graphic' to Stumble Upon" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://www.matthewbyrne.co.uk/seo/the-seo-experiment-part-2-google-rank-graphic/&amp;t=The+SEO+experiment+%26%238211%3B+Part+2+Google+Rank+graphic" title="Add 'The SEO experiment &#8211; Part 2 Google Rank graphic' to FaceBook"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/facebook.png" title="Add 'The SEO experiment &#8211; Part 2 Google Rank graphic' to FaceBook" alt="Add 'The SEO experiment &#8211; Part 2 Google Rank graphic' to FaceBook" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://www.matthewbyrne.co.uk/seo/the-seo-experiment-part-2-google-rank-graphic/" title="Add 'The SEO experiment &#8211; Part 2 Google Rank graphic' to Twitter"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/twitter.png" title="Add 'The SEO experiment &#8211; Part 2 Google Rank graphic' to Twitter" alt="Add 'The SEO experiment &#8211; Part 2 Google Rank graphic' to Twitter" /></a></div>
<!-- Social Bookmarking Reloaded END -->]]></content:encoded>
			<wfw:commentRss>http://www.matthewbyrne.co.uk/seo/the-seo-experiment-part-2-google-rank-graphic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Postcode widget &#8211; Part 2</title>
		<link>http://www.matthewbyrne.co.uk/projects/postcode-widget-part-2/</link>
		<comments>http://www.matthewbyrne.co.uk/projects/postcode-widget-part-2/#comments</comments>
		<pubDate>Sat, 16 Aug 2008 09:22:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[campaign]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[democracy]]></category>
		<category><![CDATA[Open source]]></category>
		<category><![CDATA[Postcode]]></category>

		<guid isPermaLink="false">http://www.matthewbyrne.co.uk/?p=45</guid>
		<description><![CDATA[The Easypeasy Database Today I&#8217;ve been testing the Easypeasy database for my widget project. I began by installing the data to MySQL. Very easy to do as the downloadable zip comes with a file you can import directly into MyAdmin. With the database installed I used two scripts to look at the data in more [...]]]></description>
			<content:encoded><![CDATA[<h3>The Easypeasy Database</h3>
<p>Today I&#8217;ve been testing the <a href="http://www.easypeasy.com/guides/article.php?article=64">Easypeasy database</a> for my <a href="http://www.matthewbyrne.co.uk/programming/postcode-widget-part-i">widget project</a>.</p>
<p>
I began by installing the data to MySQL. Very easy to do as the downloadable zip comes with a file you can import directly into MyAdmin.</p>
<p>
With the database installed I used two scripts to look at the data in more detail. Firstly, one to establish the initial database connecion – it’s an idea to keep this file separate so you only have to write it once. Then, a second script that builds a form and processes the results.
</p>
<p>
Once I started to plot my results it quickly became apparent that although Latitude and Longitude is returned for each entry, the numbers are all rounded up. This puts W10 and SE13 on the same spot, so there&#8217;s still a bit of work to do to figure out how to the x and y fields effect the results.
</p>
<p>
Here’s the code I wrote for the form:
</p>
<pre>
&#60;form action="&#60;?php echo $_SERVER['PHP_SELF']?&#62;" method="post"&#62;
Input Post Code:&#60;/br&#62;&#038;ltinput type="text" name="code" size="30"&#62;
&#60;input type="submit" name="submit" value="submit"&#62;
&#60;/form&#62;

&#60;?php

//Connect to the database
include 'connect.php';

//If the form has been submitted then process the form
if (isset($_POST['code'])) {

//Grab the Postcode from the form
$postcode = $_POST['code'];

//Convert the Postcode to all uppercase
$postcode = strtoupper($postcode);

//Break the Postcode into two
list($outcode, $partTwo) = split(' ', $postcode);

//Pull out the relevant fields from our database
$query = "SELECT latitude,longitude FROM hwz_postcodes WHERE
outcode = '$outcode'";
$result = mysql_query($query) or die('Query failed: '.mysql_error());
$line = mysql_fetch_array($result, MYSQL_ASSOC);

//Print Results
print $postcode.' : ';
print $line['latitude'].','.$line['longitude'];

//We've finished with the database, so close the connection
mysql_close($conn);
}

?&#62;
</pre>
<!-- Social Bookmarking Reloaded BEGIN --><div class="social_bookmark"><em> </em><br /><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.matthewbyrne.co.uk/projects/postcode-widget-part-2/&amp;title=Postcode+widget+%26%238211%3B+Part+2" title="Add 'Postcode widget &#8211; Part 2' to Del.icio.us"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/delicious.png" title="Add 'Postcode widget &#8211; Part 2' to Del.icio.us" alt="Add 'Postcode widget &#8211; Part 2' to Del.icio.us" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.matthewbyrne.co.uk/projects/postcode-widget-part-2/&amp;title=Postcode+widget+%26%238211%3B+Part+2" title="Add 'Postcode widget &#8211; Part 2' to digg"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/digg.png" title="Add 'Postcode widget &#8211; Part 2' to digg" alt="Add 'Postcode widget &#8211; Part 2' to digg" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://furl.net/storeIt.jsp?t=Postcode+widget+%26%238211%3B+Part+2&amp;u=http://www.matthewbyrne.co.uk/projects/postcode-widget-part-2/" title="Add 'Postcode widget &#8211; Part 2' to FURL"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/furl.png" title="Add 'Postcode widget &#8211; Part 2' to FURL" alt="Add 'Postcode widget &#8211; Part 2' to FURL" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.matthewbyrne.co.uk/projects/postcode-widget-part-2/&amp;title=Postcode+widget+%26%238211%3B+Part+2" title="Add 'Postcode widget &#8211; Part 2' to reddit"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/reddit.png" title="Add 'Postcode widget &#8211; Part 2' to reddit" alt="Add 'Postcode widget &#8211; Part 2' to reddit" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.matthewbyrne.co.uk/projects/postcode-widget-part-2/" title="Add 'Postcode widget &#8211; Part 2' to Technorati"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/technorati.png" title="Add 'Postcode widget &#8211; Part 2' to Technorati" alt="Add 'Postcode widget &#8211; Part 2' to Technorati" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.newsvine.com/_wine/save?u=http://www.matthewbyrne.co.uk/projects/postcode-widget-part-2/&amp;h=Postcode+widget+%26%238211%3B+Part+2" title="Add 'Postcode widget &#8211; Part 2' to Newsvine"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/newsvine.png" title="Add 'Postcode widget &#8211; Part 2' to Newsvine" alt="Add 'Postcode widget &#8211; Part 2' to Newsvine" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://ma.gnolia.com/bookmarklet/add?url=http://www.matthewbyrne.co.uk/projects/postcode-widget-part-2/&amp;title=Postcode+widget+%26%238211%3B+Part+2&amp;description=Postcode+widget+%26%238211%3B+Part+2" title="Add 'Postcode widget &#8211; Part 2' to Ma.gnolia"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/magnolia.png" title="Add 'Postcode widget &#8211; Part 2' to Ma.gnolia" alt="Add 'Postcode widget &#8211; Part 2' to Ma.gnolia" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://www.matthewbyrne.co.uk/projects/postcode-widget-part-2/&amp;title=Postcode+widget+%26%238211%3B+Part+2" title="Add 'Postcode widget &#8211; Part 2' to Stumble Upon"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/stumbleupon.png" title="Add 'Postcode widget &#8211; Part 2' to Stumble Upon" alt="Add 'Postcode widget &#8211; Part 2' to Stumble Upon" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://www.matthewbyrne.co.uk/projects/postcode-widget-part-2/&amp;t=Postcode+widget+%26%238211%3B+Part+2" title="Add 'Postcode widget &#8211; Part 2' to FaceBook"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/facebook.png" title="Add 'Postcode widget &#8211; Part 2' to FaceBook" alt="Add 'Postcode widget &#8211; Part 2' to FaceBook" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://www.matthewbyrne.co.uk/projects/postcode-widget-part-2/" title="Add 'Postcode widget &#8211; Part 2' to Twitter"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/twitter.png" title="Add 'Postcode widget &#8211; Part 2' to Twitter" alt="Add 'Postcode widget &#8211; Part 2' to Twitter" /></a></div>
<!-- Social Bookmarking Reloaded END -->]]></content:encoded>
			<wfw:commentRss>http://www.matthewbyrne.co.uk/projects/postcode-widget-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Postcode Widget &#8211; Part 1</title>
		<link>http://www.matthewbyrne.co.uk/projects/postcode-widget-part-1/</link>
		<comments>http://www.matthewbyrne.co.uk/projects/postcode-widget-part-1/#comments</comments>
		<pubDate>Thu, 31 Jul 2008 08:35:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[campaign]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[democracy]]></category>
		<category><![CDATA[Google map]]></category>
		<category><![CDATA[Open source]]></category>
		<category><![CDATA[Postcode]]></category>

		<guid isPermaLink="false">http://www.matthewbyrne.co.uk/?p=12</guid>
		<description><![CDATA[Background After playing around with Google maps for a few days it became apparent that having a list of UK postcodes plus the corresponding latitude and longitude to each would come in very handy for a lot of people. If you had such a thing you could build loads of exciting applications, from route planning [...]]]></description>
			<content:encoded><![CDATA[<h2>Background</h2>
<p>After playing around with Google maps for a few days it became apparent that having a list of UK postcodes plus the corresponding latitude and longitude to each would come in very handy for a lot of people. If you had such a thing you could build loads of exciting applications, from route planning to food mile calculators.</p>
<p>The problem is that here in the UK the list doesn’t exist in the public domain. It’s available from the Post Office, but it’ll cost you, making it effectively useless for most small groups and enterprises.</p>
<p>What’s currently available from Easypeasy is the first half of the code. With this you can break the UK into about 3,000 separate parts, narrowing a location to within a few kilometres.</p>
<h2>Project Brief</h2>
<p>There appear to be two groups pushing the Postcode into the public domain, Free the Postcode and New Popular Edition Maps.</p>
<p>What I’d like to do is build a widget that people can put on their website that makes it easy for the general public to enter their Postcode, and help build the free database. Currently you are required to specifically visit either of the two website and with Free the Postcode know by heart your latitude and longitude.</p>
<p>Using the Google Map API combined with the first half of the postcode the widget would pull up a map of your local area, from here it’s easy to stick a pin where you live or work, and then after (an email?) authentication your postcode is added to the database.</p>
<h2>References</h2>
<p>Free the Postcode: <a href="http://www.freethepostcode.org/">www.freethepostcode.org</a></p>
<p>New Popular Edition Maps: <a href="www.npemap.org.uk">www.npemap.org.uk</a></p>
<p>Postcode Schema: <a href="www.govtalk.gov.uk/gdsc/html/frames/PostCode.htm">www.govtalk.gov.uk/gdsc/html/frames/PostCode.htm</a></p>
<p>Easypeasy: <a href="www.easypeasy.com/guides/article.php?article=64">www.easypeasy.com/guides/article.php?article=64</a></p>
<!-- Social Bookmarking Reloaded BEGIN --><div class="social_bookmark"><em> </em><br /><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.matthewbyrne.co.uk/projects/postcode-widget-part-1/&amp;title=Postcode+Widget+%26%238211%3B+Part+1" title="Add 'Postcode Widget &#8211; Part 1' to Del.icio.us"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/delicious.png" title="Add 'Postcode Widget &#8211; Part 1' to Del.icio.us" alt="Add 'Postcode Widget &#8211; Part 1' to Del.icio.us" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.matthewbyrne.co.uk/projects/postcode-widget-part-1/&amp;title=Postcode+Widget+%26%238211%3B+Part+1" title="Add 'Postcode Widget &#8211; Part 1' to digg"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/digg.png" title="Add 'Postcode Widget &#8211; Part 1' to digg" alt="Add 'Postcode Widget &#8211; Part 1' to digg" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://furl.net/storeIt.jsp?t=Postcode+Widget+%26%238211%3B+Part+1&amp;u=http://www.matthewbyrne.co.uk/projects/postcode-widget-part-1/" title="Add 'Postcode Widget &#8211; Part 1' to FURL"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/furl.png" title="Add 'Postcode Widget &#8211; Part 1' to FURL" alt="Add 'Postcode Widget &#8211; Part 1' to FURL" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.matthewbyrne.co.uk/projects/postcode-widget-part-1/&amp;title=Postcode+Widget+%26%238211%3B+Part+1" title="Add 'Postcode Widget &#8211; Part 1' to reddit"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/reddit.png" title="Add 'Postcode Widget &#8211; Part 1' to reddit" alt="Add 'Postcode Widget &#8211; Part 1' to reddit" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.matthewbyrne.co.uk/projects/postcode-widget-part-1/" title="Add 'Postcode Widget &#8211; Part 1' to Technorati"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/technorati.png" title="Add 'Postcode Widget &#8211; Part 1' to Technorati" alt="Add 'Postcode Widget &#8211; Part 1' to Technorati" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.newsvine.com/_wine/save?u=http://www.matthewbyrne.co.uk/projects/postcode-widget-part-1/&amp;h=Postcode+Widget+%26%238211%3B+Part+1" title="Add 'Postcode Widget &#8211; Part 1' to Newsvine"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/newsvine.png" title="Add 'Postcode Widget &#8211; Part 1' to Newsvine" alt="Add 'Postcode Widget &#8211; Part 1' to Newsvine" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://ma.gnolia.com/bookmarklet/add?url=http://www.matthewbyrne.co.uk/projects/postcode-widget-part-1/&amp;title=Postcode+Widget+%26%238211%3B+Part+1&amp;description=Postcode+Widget+%26%238211%3B+Part+1" title="Add 'Postcode Widget &#8211; Part 1' to Ma.gnolia"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/magnolia.png" title="Add 'Postcode Widget &#8211; Part 1' to Ma.gnolia" alt="Add 'Postcode Widget &#8211; Part 1' to Ma.gnolia" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://www.matthewbyrne.co.uk/projects/postcode-widget-part-1/&amp;title=Postcode+Widget+%26%238211%3B+Part+1" title="Add 'Postcode Widget &#8211; Part 1' to Stumble Upon"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/stumbleupon.png" title="Add 'Postcode Widget &#8211; Part 1' to Stumble Upon" alt="Add 'Postcode Widget &#8211; Part 1' to Stumble Upon" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://www.matthewbyrne.co.uk/projects/postcode-widget-part-1/&amp;t=Postcode+Widget+%26%238211%3B+Part+1" title="Add 'Postcode Widget &#8211; Part 1' to FaceBook"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/facebook.png" title="Add 'Postcode Widget &#8211; Part 1' to FaceBook" alt="Add 'Postcode Widget &#8211; Part 1' to FaceBook" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://www.matthewbyrne.co.uk/projects/postcode-widget-part-1/" title="Add 'Postcode Widget &#8211; Part 1' to Twitter"><img src="http://www.matthewbyrne.co.uk/wp-content/plugins/social-bookmarking-reloaded/twitter.png" title="Add 'Postcode Widget &#8211; Part 1' to Twitter" alt="Add 'Postcode Widget &#8211; Part 1' to Twitter" /></a></div>
<!-- Social Bookmarking Reloaded END -->]]></content:encoded>
			<wfw:commentRss>http://www.matthewbyrne.co.uk/projects/postcode-widget-part-1/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
