<?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>swinhoe industries - web, video, design, digital &#38; consultancy &#187; surf-check</title>
	<atom:link href="http://swinhoeindustries.co.uk/tag/surf-check/feed/" rel="self" type="application/rss+xml" />
	<link>http://swinhoeindustries.co.uk</link>
	<description>Making the most of the web.</description>
	<lastBuildDate>Tue, 27 Sep 2011 09:19:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
<cloud domain='swinhoeindustries.co.uk' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>Technology in motion&#8230; the 24 hour surf-check challenge.</title>
		<link>http://swinhoeindustries.co.uk/2009/06/08/technology-in-motion-the-24-hour-surf-check-challenge/</link>
		<comments>http://swinhoeindustries.co.uk/2009/06/08/technology-in-motion-the-24-hour-surf-check-challenge/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 16:52:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Me]]></category>
		<category><![CDATA[Media]]></category>
		<category><![CDATA[sharing]]></category>
		<category><![CDATA[Surf]]></category>
		<category><![CDATA[Surfing]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[surf-check]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://swinhoeindustries.co.uk/?p=631</guid>
		<description><![CDATA[Usually you don&#8217;t expect to find the internet and technology closely tied to surfing, but a recent project saw that change for me at least. One of my pet-projects at the moment is the information site for Beadnell Bay &#8211; http://www.beadnellbay.info. On it Ive created a page specifically for the surf report that im providing [...]]]></description>
			<content:encoded><![CDATA[<p>Usually you don&#8217;t expect to find the internet and technology closely tied to surfing, but a recent project saw that change for me at least.</p>
<p>One of my pet-projects at the moment is the information site for Beadnell Bay &#8211; <a title="Beadnell Bay Information Website" href="http://www.beadnellbay.info" target="_blank">http://www.beadnellbay.info. </a></p>
<p>On it Ive created a page specifically for the surf report that im providing for the area (<a title="Beadnell Bay Surf Report" href="http://www.beadnellbay.info/surf-check/" target="_blank">http://www.beadnellbay.info/surf-check/</a>), and Ive been looking for an efficient way of running the content.</p>
<p>Its really not that hard, you go to the beach, take a photo, go back to the office, upload the image to the web server, and hey-presto, you have a surf report. But, doing this every day will take up more tim than is ideal, and is very repetitive.</p>
<p>So how can we make the process more streamlined ? how can it be easier ?</p>
<p>I had tried a few ideas, and had searched for the best solution online, and the best I had come=up with was to use Yahoo Pipes to push the latest image from a Flickr group into the page. The pipe is here if you want a look -</p>
<p><a title="Yahoo Pipes Surf Check Feed" href="http://pipes.yahoo.com/pipes/pipe.info?_id=tgsFay003hGYXDqQBR50VA" target="_blank">http://pipes.yahoo.com/pipes/pipe.info?_id=tgsFay003hGYXDqQBR50VA</a>.</p>
<p>However this is not really what I wanted. The images do not display large enough, and whilst its nice running it through Flickr, linking out to the set is not ideal.</p>
<p>Enter technology and the perfect solution.</p>
<div id="attachment_634" class="wp-caption alignright" style="width: 315px"><img class="size-full wp-image-634" title="Apple iPhone" src="http://swinhoeindustries.co.uk/wp-content/uploads/2009/06/apple-iphone.jpg" alt="Apple iPhone" width="305" height="415" /><p class="wp-caption-text">Apple iPhone</p></div>
<p>Im already using my iPhone to take the photograph and push it to the Flickr group, so ideally I wanted was something as easy to use but with a btter web presentation.</p>
<p>Enter the right application, and a little bit of AJAX.</p>
<p><a title="FPT Picture Upload" href="http://www.google.com/url?sa=t&amp;source=web&amp;ct=res&amp;cd=1&amp;url=http%3A%2F%2Fitunes.apple.com%2FWebObjects%2FMZStore.woa%2Fwa%2FviewSoftware%3Fid%3D302286413%26mt%3D8&amp;ei=YdYsSq8x4auMB4OWuPcK&amp;usg=AFQjCNEv5tZ5RwdagRGTn3if2MUquZWlCw&amp;sig2=uSpuv_o1VrtpAupodgfGwQ" target="_blank">FTP Picture upload</a> provides a simple and easy way to FTP any picture from your iPhone to the web server of your choice. With a little tweaking, it was up and running in 10 minutes and i had the right image on the server.</p>
<p>On the page I could now print the latest image as uploaded form my iPhone. Fantastic.</p>
<p>However the image being displayed could not be identified as recent. How where users to know that the shot was taken today ? or even this week ?</p>
<p>What I wanted was a script that could find out when the shot was taken and print that to the page, telling the users the image was recently updated.</p>
<p>JavaScript alone can not do this, but the helpful people at <a title="Javascript Help on Twitter" href="http://twitter.com/javascripthelp" target="_blank">http://twitter.com/javascripthelp</a> quickly pointed out that the XML Http Request can grab the Last Modified date from the header of any file on your server.</p>
<p>With that, I searched, found the right piece of JavaScript and then set it all in motion. (code is below).</p>
<p>The surf report image now displays, is enlargeable, and has the upload date and time printed next to it. And all automated via the iPhone.</p>
<p>Along with this, I post a text update via Twitter and you get a pretty decent surf report. <img src='http://swinhoeindustries.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<img src="http://www.beadnellbay.info/surfcheck/surf_check1.jpg" alt="Beadnell Bay Surf Report" width="500" /></p>
<p>******************  Example Code ******************</p>
<p>&lt;script type=&#8221;text/javascript&#8221;&gt;</p>
<p>var xmlhttp=false;<br />
try<br />
{<br />
xmlhttp = new ActiveXObject(&#8220;Msxml2.XMLHTTP&#8221;); /* for IE &lt; 5 */<br />
}<br />
catch (e)<br />
{<br />
try<br />
{<br />
xmlhttp = new ActiveXObject(&#8220;Microsoft.XMLHTTP&#8221;);<br />
}<br />
catch (E)<br />
{<br />
xmlhttp = false;<br />
}<br />
}</p>
<p>/* mozilla &amp; opera */<br />
if (!xmlhttp &amp;&amp; typeof XMLHttpRequest!=&#8217;undefined&#8217;)<br />
{<br />
xmlhttp = new XMLHttpRequest();<br />
}</p>
<p>var upDated</p>
<p>function getUpdated(){</p>
<p>xmlhttp.open(&#8220;HEAD&#8221;, &#8220;MyPic.JPG&#8221;,true);<br />
xmlhttp.onreadystatechange=function() {<br />
if (xmlhttp.readyState==4) {<br />
upDated = xmlhttp.getResponseHeader(&#8220;Last-Modified&#8221;);<br />
document.getElementById(&#8220;theDate&#8221;).innerHTML = upDated;<br />
}<br />
}<br />
xmlhttp.send(null)<br />
}</p>
<p>&lt;/script&gt;</p>
<p>&lt;/head&gt;<br />
&lt;body onload=&#8221;getUpdated();return false;&#8221;&gt;<br />
&lt;img src=&#8221;MyPic.JPG&#8221; alt=&#8221;MBP_box&#8221; width=&#8221;500&#8243; /&gt;<br />
&lt;br/&gt;Picture updated on &#8211; &lt;p id=&#8221;theDate&#8221;&gt;Updating&#8230;&lt;/p&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://swinhoeindustries.co.uk/2009/06/08/technology-in-motion-the-24-hour-surf-check-challenge/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

