<?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>Florent Clairambault &#187; Google Latitude</title>
	<atom:link href="http://florent.clairambault.fr/tag/google-latitude/feed" rel="self" type="application/rss+xml" />
	<link>http://florent.clairambault.fr</link>
	<description></description>
	<lastBuildDate>Sat, 04 Feb 2012 19:56:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-alpha-19719</generator>
		<item>
		<title>Google Latitude History</title>
		<link>http://florent.clairambault.fr/google-latitude-history?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=google-latitude-history</link>
		<comments>http://florent.clairambault.fr/google-latitude-history#comments</comments>
		<pubDate>Sat, 17 Jul 2010 08:00:21 +0000</pubDate>
		<dc:creator>Florent Clairambault</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[geolocation]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Latitude]]></category>

		<guid isPermaLink="false">http://florent.clairambault.fr/?p=2928</guid>
		<description><![CDATA[I thought about this service as soon as Google released the Google Latitude service : &#8220;It would be great if they could save data so that we could see where we were at a specific time.&#8221; And I very quickly published some code to get my position (you could be tracking me right now with [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://i.mivi.fr/87862c736fd9fcbeaeaa0ecfbc54732e1f670fac.png" style="position: relative; float: right; margin-left: 10px" />I thought about this service as soon as Google released the Google Latitude service : &#8220;It would be great if they could save data so that we could see where we were at a specific time.&#8221; And I very quickly published <a href="http://florent.clairambault.fr/access-your-google-latitude-position-from-a-net-app">some code to get my position</a> (you could be tracking me right now with it). I thought they would never release the history saving feature as people would have feared for their privacy and things like that. But they did it.</p>
<p><a href="http://www.google.com/latitude/apps/history">http://www.google.com/latitude/apps/history</a></p>
<p>I don&#8217;t know if it&#8217;s just me but I find it somehow related to what does foursquare in the way that it both help you to connect to your friends and you become rich of the location data you give them. In foursquare you have the possibility to become the mayor of nearly anything. In Google Maps, well, you possess your own tracking data.<br />
Which basically means that the more you track, the more you create content. Couldn&#8217;t it be one of the key motivational factors ?</p>
<p>Google knows my mails, my contacts, my web search history, my favorites (using chrome sync), my discussions (on google talk even though I&#8217;m progressively switching to Skype), my photos, my credit card number, some friends on orkut and now my position. If you think they&#8217;re an evil big brother, you should just create better products, I&#8217;ll switch to your instantly.</p>
]]></content:encoded>
			<wfw:commentRss>http://florent.clairambault.fr/google-latitude-history/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Access your Google Latitude position from PHP</title>
		<link>http://florent.clairambault.fr/access-your-google-latitude-position-from-php?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=access-your-google-latitude-position-from-php</link>
		<comments>http://florent.clairambault.fr/access-your-google-latitude-position-from-php#comments</comments>
		<pubDate>Mon, 22 Jun 2009 21:45:06 +0000</pubDate>
		<dc:creator>Florent Clairambault</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Latitude]]></category>

		<guid isPermaLink="false">http://florent.clairambault.fr/?p=1233</guid>
		<description><![CDATA[The code to access your Google Latitude position is even simpler in PHP than it is in .Net : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 &#60;?PHP header&#40;'Content-Type: text/plain'&#41;; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>The code to access your Google Latitude position is even simpler in PHP than it is <a href="http://florent.clairambault.fr/access-your-google-latitude-position-from-a-net-app">in .Net</a> :</p>

<div class="wp_codebox"><table><tr id="p12332"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
</pre></td><td class="code" id="p1233code2"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?PHP</span>
<a href="http://www.php.net/header"><span style="color: #990000;">header</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Content-Type: text/plain'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$userId</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'5616045291659744796'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'user'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <a href="http://www.php.net/is_numeric"><span style="color: #990000;">is_numeric</span></a><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'user'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #000088;">$userId</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'user'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">else</span>
		<a href="http://www.php.net/exit"><span style="color: #990000;">exit</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'This isn\'t a valid user id.'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'http://www.google.com/latitude/apps/badge/api?user='</span><span style="color: #339933;">.</span><span style="color: #000088;">$userId</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&amp;type=json'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// We get the content</span>
<span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/file_get_contents"><span style="color: #990000;">file_get_contents</span></a><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$url</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// We convert the JSON to an object</span>
<span style="color: #000088;">$json</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/json_decode"><span style="color: #990000;">json_decode</span></a><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$content</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$coord</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$json</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">features</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">geometry</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">coordinates</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$timeStamp</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$json</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">features</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">properties</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">timeStamp</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span> <span style="color: #000088;">$coord</span> <span style="color: #009900;">&#41;</span> 
	<a href="http://www.php.net/exit"><span style="color: #990000;">exit</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'This user doesn\'t exist.'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$date</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'d/m/Y H:i:s'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$timeStamp</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$lat</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$coord</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$lon</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$coord</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$date</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' : '</span><span style="color: #339933;">.</span><span style="color: #000088;">$lat</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' x '</span><span style="color: #339933;">.</span><span style="color: #000088;">$lon</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>This program is <a href="http://florent.clairambault.fr/demo/google-latitude.php">available for testing here</a>. It requires PHP 5.2.0 to run the <a href="http://us.php.net/manual/en/function.json-decode.php">json_decode</a> method.</p>
<p>I think this is the power of PHP, you can make some powerful code in no time. The drawback is that it&#8217;s really slow, and it becomes  even slower if you begin to use heavy objects (and objects are often heavy). And I personally think it&#8217;s much easier and safer to debug and maintain complex .Net programs than complex PHP programs.</p>
<p>By the way, you can generate your google badge userid that you can then use for the API <a href="https://www.google.com/latitude/apps/badge">here</a>. <i>(thank you Neavilag for this comment)</i></p>
]]></content:encoded>
			<wfw:commentRss>http://florent.clairambault.fr/access-your-google-latitude-position-from-php/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Access your Google Latitude position from a .Net app</title>
		<link>http://florent.clairambault.fr/access-your-google-latitude-position-from-a-net-app?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=access-your-google-latitude-position-from-a-net-app</link>
		<comments>http://florent.clairambault.fr/access-your-google-latitude-position-from-a-net-app#comments</comments>
		<pubDate>Mon, 22 Jun 2009 21:32:41 +0000</pubDate>
		<dc:creator>Florent Clairambault</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[C# .Net]]></category>
		<category><![CDATA[geolocation]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Latitude]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[VS2010]]></category>

		<guid isPermaLink="false">http://florent.clairambault.fr/?p=1213</guid>
		<description><![CDATA[When I saw that Google Latitude now enables you to access your data by a JSON feed, I decided to make it communicate with a little GPS tracking project of mine. I&#8217;m really found of all these ways we now have to make anything communicate with anything. You can build interfaces from any system to [...]]]></description>
			<content:encoded><![CDATA[<p>When I saw that Google Latitude now enables you to access your data by a JSON feed, I decided to make it communicate with a little GPS tracking project of mine.</p>
<p>I&#8217;m really found of all these ways we now have to make anything communicate with anything. You can build interfaces from any system to any other system really easily.</p>
<p>This code enables you to automatically get your GPS position (or the position of a friend) from your JSON Latitude feed. To be able to do that, you have to <a href="http://www.google.com/latitude/apps/badge">enable your KML/JSON feed</a>.<br />
It requires .Net 3.5&#8242;s System.Web.Extensions</p>

<div class="wp_codebox"><table><tr id="p12134"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
</pre></td><td class="code" id="p1213code4"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Collections.Generic</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Text</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Web.Script.Serialization</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Net</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.IO</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">namespace</span> LatitudeReader <span style="color: #008000;">&#123;</span>
	<span style="color: #6666cc; font-weight: bold;">class</span> Program <span style="color: #008000;">&#123;</span>
		<span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">void</span> Main<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span>
&nbsp;
			Console<span style="color: #008000;">.</span><span style="color: #0000FF;">WriteLine</span><span style="color: #008000;">&#40;</span> <span style="color: #666666;">&quot;What is your user id ?&quot;</span> <span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
			var userId <span style="color: #008000;">=</span> Console<span style="color: #008000;">.</span><span style="color: #0000FF;">ReadLine</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
			<span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span> userId <span style="color: #008000;">==</span> <span style="color: #6666cc; font-weight: bold;">String</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Empty</span> <span style="color: #008000;">&#41;</span>
				userId <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;5616045291659744796&quot;</span><span style="color: #008000;">;</span>
&nbsp;
			<span style="color: #008080; font-style: italic;">// Url of the JSON Latitude feed</span>
			var url <span style="color: #008000;">=</span> <span style="color: #6666cc; font-weight: bold;">String</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Format</span><span style="color: #008000;">&#40;</span> <span style="color: #666666;">&quot;http://www.google.com/latitude/apps/badge/api?user={0}&amp;type=json&quot;</span>, userId <span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
			<span style="color: #008080; font-style: italic;">// We download the file</span>
			var ms <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> MemoryStream<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
			Download<span style="color: #008000;">&#40;</span> url, ms <span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
			<span style="color: #008080; font-style: italic;">// JSON in text format</span>
			var textContent <span style="color: #008000;">=</span> UTF8Encoding<span style="color: #008000;">.</span><span style="color: #0000FF;">UTF8</span><span style="color: #008000;">.</span><span style="color: #0000FF;">GetString</span><span style="color: #008000;">&#40;</span> ms<span style="color: #008000;">.</span><span style="color: #0000FF;">ToArray</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
			<span style="color: #008080; font-style: italic;">// We convert the JSON text file to an object</span>
			<span style="color: #008080; font-style: italic;">// It returns </span>
			var jss <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> JavaScriptSerializer<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
			var jsonContent <span style="color: #008000;">=</span> jss<span style="color: #008000;">.</span><span style="color: #0000FF;">DeserializeObject</span><span style="color: #008000;">&#40;</span> textContent <span style="color: #008000;">&#41;</span> <span style="color: #0600FF; font-weight: bold;">as</span> Dictionary<span style="color: #008000;">&lt;</span><span style="color: #6666cc; font-weight: bold;">String</span>, <span style="color: #6666cc; font-weight: bold;">Object</span><span style="color: #008000;">&gt;;</span>
&nbsp;
			<span style="color: #008080; font-style: italic;">// We get the data</span>
			var features <span style="color: #008000;">=</span> <span style="color: #008000;">&#40;</span> jsonContent<span style="color: #008000;">&#91;</span> <span style="color: #666666;">&quot;features&quot;</span> <span style="color: #008000;">&#93;</span> <span style="color: #0600FF; font-weight: bold;">as</span> <span style="color: #6666cc; font-weight: bold;">object</span><span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> <span style="color: #008000;">&#41;</span><span style="color: #008000;">&#91;</span> <span style="color: #FF0000;">0</span> <span style="color: #008000;">&#93;</span> <span style="color: #0600FF; font-weight: bold;">as</span> Dictionary<span style="color: #008000;">&lt;</span><span style="color: #6666cc; font-weight: bold;">string</span>, <span style="color: #6666cc; font-weight: bold;">object</span><span style="color: #008000;">&gt;;</span>
			var geometry <span style="color: #008000;">=</span> features<span style="color: #008000;">&#91;</span> <span style="color: #666666;">&quot;geometry&quot;</span> <span style="color: #008000;">&#93;</span> <span style="color: #0600FF; font-weight: bold;">as</span> Dictionary<span style="color: #008000;">&lt;</span><span style="color: #6666cc; font-weight: bold;">string</span>, <span style="color: #6666cc; font-weight: bold;">object</span><span style="color: #008000;">&gt;;</span>
			var coordinates <span style="color: #008000;">=</span> geometry<span style="color: #008000;">&#91;</span> <span style="color: #666666;">&quot;coordinates&quot;</span> <span style="color: #008000;">&#93;</span> <span style="color: #0600FF; font-weight: bold;">as</span> <span style="color: #6666cc; font-weight: bold;">object</span><span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">;</span>
			var lon <span style="color: #008000;">=</span> coordinates<span style="color: #008000;">&#91;</span> <span style="color: #FF0000;">0</span> <span style="color: #008000;">&#93;</span> <span style="color: #0600FF; font-weight: bold;">as</span> <span style="color: #6666cc; font-weight: bold;">decimal</span><span style="color: #008000;">?;</span>
			var lat <span style="color: #008000;">=</span> coordinates<span style="color: #008000;">&#91;</span> <span style="color: #FF0000;">1</span> <span style="color: #008000;">&#93;</span> <span style="color: #0600FF; font-weight: bold;">as</span> <span style="color: #6666cc; font-weight: bold;">decimal</span><span style="color: #008000;">?;</span>
&nbsp;
			<span style="color: #008080; font-style: italic;">// And then the timestamp</span>
			var properties <span style="color: #008000;">=</span> features<span style="color: #008000;">&#91;</span> <span style="color: #666666;">&quot;properties&quot;</span> <span style="color: #008000;">&#93;</span> <span style="color: #0600FF; font-weight: bold;">as</span> Dictionary<span style="color: #008000;">&lt;</span><span style="color: #6666cc; font-weight: bold;">string</span>, <span style="color: #6666cc; font-weight: bold;">object</span><span style="color: #008000;">&gt;;</span>
			var date <span style="color: #008000;">=</span> ConvertFromUnixTimestamp<span style="color: #008000;">&#40;</span> <span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">double</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">int</span><span style="color: #008000;">&#41;</span> properties<span style="color: #008000;">&#91;</span> <span style="color: #666666;">&quot;timeStamp&quot;</span> <span style="color: #008000;">&#93;</span> <span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
			<span style="color: #008080; font-style: italic;">// We convert the UTC date to local time</span>
			date <span style="color: #008000;">=</span> date<span style="color: #008000;">.</span><span style="color: #0000FF;">ToLocalTime</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
			Console<span style="color: #008000;">.</span><span style="color: #0000FF;">WriteLine</span><span style="color: #008000;">&#40;</span> <span style="color: #666666;">&quot;{0} : {1} x {2}&quot;</span>, date, lat, lon <span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
		<span style="color: #008000;">&#125;</span>
&nbsp;
		<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">static</span> DateTime ConvertFromUnixTimestamp<span style="color: #008000;">&#40;</span> <span style="color: #6666cc; font-weight: bold;">double</span> timestamp <span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span>
			DateTime origin <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> DateTime<span style="color: #008000;">&#40;</span> <span style="color: #FF0000;">1970</span>, <span style="color: #FF0000;">1</span>, <span style="color: #FF0000;">1</span>, <span style="color: #FF0000;">0</span>, <span style="color: #FF0000;">0</span>, <span style="color: #FF0000;">0</span>, <span style="color: #FF0000;">0</span> <span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
			<span style="color: #0600FF; font-weight: bold;">return</span> origin<span style="color: #008000;">.</span><span style="color: #0000FF;">AddSeconds</span><span style="color: #008000;">&#40;</span> timestamp <span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
		<span style="color: #008000;">&#125;</span>
&nbsp;
		<span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #0600FF; font-weight: bold;">const</span> <span style="color: #6666cc; font-weight: bold;">int</span> BUFFER_SIZE <span style="color: #008000;">=</span> <span style="color: #FF0000;">1024</span><span style="color: #008000;">;</span>
&nbsp;
		<span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">void</span> Download<span style="color: #008000;">&#40;</span> <span style="color: #6666cc; font-weight: bold;">string</span> url, Stream writeStream <span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span>
			var request <span style="color: #008000;">=</span> <span style="color: #008000;">&#40;</span>HttpWebRequest<span style="color: #008000;">&#41;</span> WebRequest<span style="color: #008000;">.</span><span style="color: #0000FF;">Create</span><span style="color: #008000;">&#40;</span> url <span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
			var response <span style="color: #008000;">=</span> request<span style="color: #008000;">.</span><span style="color: #0000FF;">GetResponse</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
			var readStream <span style="color: #008000;">=</span> response<span style="color: #008000;">.</span><span style="color: #0000FF;">GetResponseStream</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
			var data <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> <span style="color: #6666cc; font-weight: bold;">Byte</span><span style="color: #008000;">&#91;</span> BUFFER_SIZE <span style="color: #008000;">&#93;</span><span style="color: #008000;">;</span>
&nbsp;
			<span style="color: #6666cc; font-weight: bold;">int</span> n<span style="color: #008000;">;</span>
			<span style="color: #0600FF; font-weight: bold;">do</span> <span style="color: #008000;">&#123;</span>
				n <span style="color: #008000;">=</span> readStream<span style="color: #008000;">.</span><span style="color: #0000FF;">Read</span><span style="color: #008000;">&#40;</span> data, <span style="color: #FF0000;">0</span>, BUFFER_SIZE <span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
				writeStream<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span> data, <span style="color: #FF0000;">0</span>, n <span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
			<span style="color: #008000;">&#125;</span> <span style="color: #0600FF; font-weight: bold;">while</span> <span style="color: #008000;">&#40;</span> n <span style="color: #008000;">&gt;</span> <span style="color: #FF0000;">0</span> <span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
			writeStream<span style="color: #008000;">.</span><span style="color: #0000FF;">Flush</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
			readStream<span style="color: #008000;">.</span><span style="color: #0000FF;">Close</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
		<span style="color: #008000;">&#125;</span>
	<span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>The only references you need are : System and System.Web.Extensions</p>
]]></content:encoded>
			<wfw:commentRss>http://florent.clairambault.fr/access-your-google-latitude-position-from-a-net-app/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 1/19 queries in 0.006 seconds using disk: basic
Object Caching 505/529 objects using disk: basic

Served from: florent.clairambault.fr @ 2012-02-04 23:25:41 -->
