<?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>GeeK`s Lifez &#187; Geolocalisation</title>
	<atom:link href="http://blog.cannibalz.net/category/geolocalisation/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.cannibalz.net</link>
	<description>GeeK`s Lifez</description>
	<lastBuildDate>Mon, 16 Jan 2012 21:00:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Geolocalisation PHP</title>
		<link>http://blog.cannibalz.net/2008/04/15/geolocalisation-php/</link>
		<comments>http://blog.cannibalz.net/2008/04/15/geolocalisation-php/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 18:04:09 +0000</pubDate>
		<dc:creator>JaCe</dc:creator>
				<category><![CDATA[Geolocalisation]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.cannibalz.net/?p=40</guid>
		<description><![CDATA[Aujourd'hui, au hasard du Web je suis tombé sur un outil qui permet de faire de la Géolocalisation en PHP grâce a Apache. J'ai essayé cette méthode qui semble fonctionner. Il faut toutefois faire ses tests sur une machine en dehors du réseaux (une machine distante quoi). Dans un premier temps, installer le module Apache [...]]]></description>
			<content:encoded><![CDATA[<p>Aujourd'hui, au hasard du Web je suis tombé sur un outil qui permet de faire de la Géolocalisation en PHP grâce a Apache.</p>
<p><span id="more-40"></span></p>
<p>J'ai essayé cette méthode qui semble fonctionner. Il faut toutefois faire ses tests sur une machine en dehors du réseaux (une machine distante quoi).</p>
<p>Dans un premier temps, installer le module Apache qui va bien:</p>
<ul>
<li># apt-get install libapache2-mod-geoip</li>
</ul>
<p>Rajoutez ceci au VirtualHost concerné par ce module:</p>
<pre>&lt;IfModule mod_geoip.c&gt;
GeoIPEnable On
GeoIPDBFile /usr/share/GeoIP/GeoIP.dat
&lt;/IfModule&gt;

Redémarrez Apache:</pre>
<ul>
<li># /etc/init.d/apache2 restart</li>
</ul>
<p>Dans une nouvelle page PHP ajoutez ceci:</p>
<pre>&lt;html&gt;
&lt;body&gt;
&lt;?php
$country_name = apache_note("GEOIP_COUNTRY_NAME");
print "Country: " . $country_name;
?&gt;
&lt;/body&gt;
&lt;/html&gt;

Et voila, rendez-vous sur la page et admirez :)</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.cannibalz.net/2008/04/15/geolocalisation-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

