<?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>Hax by Jaku &#187; google latitude</title>
	<atom:link href="http://haxbyjaku.com/tag/google-latitude/feed/" rel="self" type="application/rss+xml" />
	<link>http://haxbyjaku.com</link>
	<description>Don't tell me what to do.</description>
	<lastBuildDate>Sat, 03 Dec 2011 11:17:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>GPS Code Update</title>
		<link>http://haxbyjaku.com/projects/gps-code-update/</link>
		<comments>http://haxbyjaku.com/projects/gps-code-update/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 04:35:14 +0000</pubDate>
		<dc:creator>Jaku</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[google latitude]]></category>
		<category><![CDATA[gps]]></category>
		<category><![CDATA[mobileme]]></category>
		<category><![CDATA[playnice]]></category>

		<guid isPermaLink="false">http://haxbyjaku.com/?p=431</guid>
		<description><![CDATA[So it seems I have to write this post again because my server crashed.. leaving everything alone but my sql databases&#8230; Oh well, could be a lot worst. So after my post yesterday about how I update my location on my site I got a reply from @andre_vans that told me about a project called [...]]]></description>
			<content:encoded><![CDATA[<p>So it seems I have to write this post again because my server crashed.. leaving everything alone but my sql databases&#8230; Oh well, could be a lot worst.</p>
<p>So after my post yesterday about how I update my location on my site I got a reply from <a href="http://twitter.com/andre_vans/status/4167563550">@andre_vans</a> that told me about a project called &#8220;PlayNice&#8221;. The GIThub source is at <a href="http://github.com/natfriedman/playnice">http://github.com/natfriedman/playnice</a> and the the creator of it has a blog post about it at <a href="http://nat.org/blog/2009/08/playnice-google-apple/">http://nat.org/blog/2009/08/playnice-google-apple/</a>.</p>
<p>Now I mentioned in my post yesterday that I wanted to be able to use some sort of push notification on the iPhone so that my site could ask for an update and the phone would comply. This would require a custom app on the iPhone to  automatically execute something when it has a push notification. Now I&#8217;m not even sure if that is possible at this stage as that would almost be like the app is running in the background, which apple does not allow yet. However, Apple has such a service built into the phone that allows anyone with a MobileMe account linked to their iPhone to get the location of the device. </p>
<p>So with that PlayNice will basically log in as you on your MobileMe account and launch the locate phone feature. Now the neat thing about this is that it also updates to your Google Latitude account. This make&#8217;s it pretty much perfect for what I want to do. With the source code freely available and easy to understand it was a breeze adding 3 lines of code to update my map backend whenever the PlayNice script is ran. If you wan&#8217;t to do the same with most of the code from my post yesterday then follow me past the break. Otherwise, ignore me. <img src='http://haxbyjaku.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<span id="more-431"></span><br />
Now that you are here we know who the true Jaku fans are. <img src='http://haxbyjaku.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>Alright so the code that we used yesterday, we only need the mologogo part. So the &#8220;update.html&#8221; is pretty much useless but you could still certainly use it. What is important here is that you follow the steps in yesterdays post to get the database and mologogo backend software working. Once you do that you will need to make a change to the &#8220;submit_2343.php&#8221; file or whatever you renamed it to. All you need to do is uncomment lines 41 and 42. This will allow those variables to work again.</p>
<p>The next step is to download the PlayNice code from <a href="http://github.com/natfriedman/playnice">http://github.com/natfriedman/playnice</a> and follow the install instructions. After doing that you will want to edit the &#8220;playnice.php&#8221; file and add the following lines around line 91.<br />
<code><br />
$lat = "$iphoneLocation->latitude";<br />
$lon = "$iphoneLocation->longitude";<br />
system ("/usr/bin/curl LOCATION_OF_UPDATE.PHP?pointType=GPS'&#038;'name=Jaku'&#038;'lat=$lat'&#038;'lon=$lon");<br />
</code><br />
Now you don&#8217;t need to make those variables if you use the the full $iphoneLocation->latitude\longitude names in your system call, but it looks cleaner. </p>
<p>After you make that change your GPS updates should start getting populated in your GPS map backup.</p>
<p>Up next for me is the creation of a new backup now that I have the simplest update, it&#8217;s time to clean up that backend. <img src='http://haxbyjaku.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://haxbyjaku.com/projects/gps-code-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

