<?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/"
	
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Roberto Scano &#187; placemaker</title>
	<atom:link href="http://robertoscano.info/tag/placemaker/feed/" rel="self" type="application/rss+xml" />
	<link>http://robertoscano.info</link>
	<description>Il sito Web</description>
	<lastBuildDate>Sun, 18 Jul 2010 07:32: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>Yahoo Placemaker: geolocalizzare i contenuti di una pagina Web</title>
		<link>http://robertoscano.info/random-bits/yahoo-placemaker-geolocalizzare-i-contenuti-di-una-pagina-web/</link>
		<comments>http://robertoscano.info/random-bits/yahoo-placemaker-geolocalizzare-i-contenuti-di-una-pagina-web/#comments</comments>
		<pubDate>Thu, 21 May 2009 15:06:57 +0000</pubDate>
		<dc:creator>Roberto Scano</dc:creator>
				<category><![CDATA[Random bits]]></category>
		<category><![CDATA[Web4All]]></category>
		<category><![CDATA[placemaker]]></category>
		<category><![CDATA[yahoo]]></category>

		<guid isPermaLink="false">http://robertoscano.info/?p=780</guid>
		<description><![CDATA[Grazie ad un nuovo Webservice di Yahoo, Yahoo Placemaker, è possibile estrarre informazioni (la georeferenziazione) di qualsiasi località citata all&#8217;interno di una pagina Web, RSS o anche documento di testo. Come sempre un esempio vale più di mille parole. Per utilizzare il webservice è necessario richiamare l&#8217;indirizzo Web http://wherein.yahooapis.com inviando tramite POST quattro parametri: l&#8217;indirizzo [...]]]></description>
			<content:encoded><![CDATA[<p>Grazie ad un nuovo Webservice di Yahoo, <a href="http://developer.yahoo.com/geo/placemaker/">Yahoo Placemaker</a>, è possibile estrarre informazioni (la georeferenziazione) di qualsiasi località citata all&#8217;interno di una pagina Web, RSS o anche documento di testo.<br />
Come sempre un <a href="http://isithackday.com/hacks/placemaker/index.php" rel="nofollow" title="esempio">esempio vale più di mille parole</a>.<br />
Per utilizzare il webservice è necessario richiamare l&#8217;indirizzo Web http://wherein.yahooapis.com inviando tramite POST quattro parametri:</p>
<ul>
<li>l&#8217;indirizzo della risorsa (URI) di cui si vuole geolocalizzare i contenuti, ad esempio http://robertoscano.info</li>
<li>il tipo di documento che può essere text/plain, text/html, text/xml, text/rss, application/xml oppure application/xml+rss</li>
<li>il formato di documento che si desidera come output (XML o RSS)</li>
<li>la Yahoo Application ID</li>
</ul>
<p>Tramite PHP possiamo usare curl nel seguente modo:<br />
<code><br />
&lt;?php<br />
$key = 'CHIAVE_API_DI_YAHOO';<br />
$apiendpoint = 'http://wherein.yahooapis.com/v1/document';<br />
$url = 'http://robertoscano.info';<br />
$inputType = 'text/html';<br />
$outputType = 'xml';<br />
$post = 'appid='.$key.'&#038;documentURL='.$url.<br />
                '&#038;documentType='.$inputType.'&#038;outputType='.$outputType;<br />
$ch = curl_init($apiendpoint);<br />
curl_setopt($ch, CURLOPT_POST, 1);<br />
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);<br />
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);<br />
$results = curl_exec($ch);<br />
header('content-type:text/xml');<br />
echo $results;<br />
?&gt;<br />
</code></p>
<p>Per chi vuole approfondire meglio l&#8217;estrazione dei contenuti segnalo l&#8217;ottimo articolo di <a href="http://developer.yahoo.net/blog/archives/2009/05/geolocating_web.html" rel="nofollow">Chris Heilmann</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://robertoscano.info/random-bits/yahoo-placemaker-geolocalizzare-i-contenuti-di-una-pagina-web/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
	</item>
	</channel>
</rss>
