<?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>Naeh.net &#187; php</title>
	<atom:link href="http://naeh.net/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://naeh.net</link>
	<description>Le mémo du développeur</description>
	<lastBuildDate>Wed, 30 Jun 2010 18:56:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>La dure vie du développeur web</title>
		<link>http://naeh.net/la-dure-vie-du-developpeur-web/</link>
		<comments>http://naeh.net/la-dure-vie-du-developpeur-web/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 21:51:56 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[Divers]]></category>
		<category><![CDATA[développement]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://naeh.net/?p=126</guid>
		<description><![CDATA[une excellente parodie en l'honneur des développeurs web, dont je fais fièrement partie :D

le site e-commerce à 400€ c'est trop fort :-)
]]></description>
			<content:encoded><![CDATA[<p>une excellente parodie en l'honneur des développeurs web, dont je fais fièrement partie :D</p>
<p><center><object width="480" height="275"><param name="movie" value="http://www.dailymotion.com/swf/xbfjlq&#038;related=0"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.dailymotion.com/swf/xbfjlq&#038;related=0" type="application/x-shockwave-flash" width="480" height="275" allowfullscreen="true" allowscriptaccess="always"></embed></object></center></p>
<p>le site e-commerce à 400€ c'est trop fort :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://naeh.net/la-dure-vie-du-developpeur-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Forcer le téléchargement d&#8217;un fichier avec PHP</title>
		<link>http://naeh.net/forcer-le-telechargement-dun-fichier-avec-php/</link>
		<comments>http://naeh.net/forcer-le-telechargement-dun-fichier-avec-php/#comments</comments>
		<pubDate>Tue, 18 Mar 2008 22:16:33 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[PHP / MySQL]]></category>
		<category><![CDATA[Programmation]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[header]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Serveur]]></category>
		<category><![CDATA[telecharger]]></category>

		<guid isPermaLink="false">http://naeh.net/forcer-le-telechargement-dun-fichier-avec-php/</guid>
		<description><![CDATA[Dance cet article nous allons voir comment forcer le navigateur à télécharger un fichier (n'importe lequel) au lieux de l'ouvrir. Pour cela nous allons utiliser les Headers qu'envoie le serveur au navigateur (fonction header de php).
Voici le code a utiliser :

 //date actuelle
$date = gmdate&#40;'D, d M Y H:i:s'&#41;;
&#160;
header&#40;&#34;Content-Type: text/xml&#34;&#41;; //Ici par exemple c'est pour [...]]]></description>
			<content:encoded><![CDATA[<p>Dance cet article nous allons voir comment forcer le navigateur à télécharger un fichier (n'importe lequel) au lieux de l'ouvrir. Pour cela nous allons utiliser les <strong>Headers</strong> qu'envoie le serveur au navigateur (<a href="http://fr3.php.net/manual/fr/function.header.php" target="_blank">fonction header de php</a>).</p>
<p>Voici le code a utiliser :</p>

<div class="wp_codebox"><table><tr id="p503"><td class="code" id="p50code3"><pre class="php" style="font-family:monospace;"> <span style="color: #666666; font-style: italic;">//date actuelle</span>
<span style="color: #000088;">$date</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/gmdate"><span style="color: #990000;">gmdate</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'D, d M Y H:i:s'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<a href="http://www.php.net/header"><span style="color: #990000;">header</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Content-Type: text/xml&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//Ici par exemple c'est pour un fichier XML, a changer en fonction du type mime du fichier voulu.</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-Disposition: attachment; filename=NOM_FICHIER.xml'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</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;">'Last-Modified: '</span><span style="color: #339933;">.</span> <span style="color: #000088;">$date</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' GMT'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</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;">'Expires: '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$date</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">//header specifique IE :s parce que sinon il aime pas</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/preg_match"><span style="color: #990000;">preg_match</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/msie|(microsoft internet explorer)/i'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</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;">'Cache-Control: must-revalidate, post-check=0, pre-check=0'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</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;">'Pragma: public'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</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;">'Pragma: no-cache'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$CONTENU_DE_NOTRE_FICHIER</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// ou readfile('CHEMIN_FICHIER'); En fonction du type de fichier.</span></pre></td></tr></table></div>

<p>Le type Mime doit être celui du fichier qu'on veut pouvoir télécharger (<a href="http://www.c-p-f.org/divers-Liste_des_types_MIME-a15.html" target="_blank">liste des types mime disponibles</a>). En voici quelques exemples :</p>

<div class="wp_codebox"><table><tr id="p504"><td class="code" id="p50code4"><pre class="bash" style="font-family:monospace;">image GIF : image<span style="color: #000000; font-weight: bold;">/</span>gif
fichier XML : text<span style="color: #000000; font-weight: bold;">/</span>xml
fichier rtf : application<span style="color: #000000; font-weight: bold;">/</span>rtf
fichier avi : video<span style="color: #000000; font-weight: bold;">/</span>msvideo</pre></td></tr></table></div>

<p>Maintenant à vos fichiers dl.php ;-)</p>
]]></content:encoded>
			<wfw:commentRss>http://naeh.net/forcer-le-telechargement-dun-fichier-avec-php/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Extraire le contenu d&#8217;un zip directement sur son FTP chez free</title>
		<link>http://naeh.net/extraire-le-contenu-dun-zip-directement-sur-son-ftp-chez-free/</link>
		<comments>http://naeh.net/extraire-le-contenu-dun-zip-directement-sur-son-ftp-chez-free/#comments</comments>
		<pubDate>Sun, 16 Mar 2008 17:13:21 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[PHP / MySQL]]></category>
		<category><![CDATA[Programmation]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[extraire]]></category>
		<category><![CDATA[hébergement]]></category>
		<category><![CDATA[librairie]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Serveur]]></category>
		<category><![CDATA[zip]]></category>

		<guid isPermaLink="false">http://naeh.net/extraire-le-contenu-dun-zip-directement-sur-son-ftp-chez-free/</guid>
		<description><![CDATA[Dans cette article nous allons voir comment procéder pour dézippé le contenu d'une archive directement sur son FTP free. Ceci peut être très intéressant si on a plusieurs (beaucoup) fichiers à envoyer sur le ftp, parfois ce genre d'upload peut s'avérer très difficile en fonction de la connexion, du logicile client FTP, mais aussi de [...]]]></description>
			<content:encoded><![CDATA[<p>Dans cette article nous allons voir comment procéder pour dézippé le contenu d'une archive directement sur son FTP free. Ceci peut être très intéressant si on a plusieurs (beaucoup) fichiers à envoyer sur le ftp, parfois ce genre d'upload peut s'avérer très difficile en fonction de la connexion, du logicile client FTP, mais aussi de l'humeur du serveur FTP de chez free. On peut se retrouver avec un certain nombre de fichiers qui ne seront pas envoyé (perdus en route ?!).</p>
<p>L'astuce consiste à mettre tous ses fichiers dans ZIP, uploader le zip sur le FTP et l'extraire sur place avec script PHP. Parce que envoyer UN SEUL fichier quelque soit sa taille, est toujours plus simple que d'en envoyer 36 000.</p>
<p>Pour commencer il faut savoir que Free ne propose aucune librairie PHP pour gérer les archives, donc nous utiliserons une classe de substitution, pour l'exemple, on va utiliser <a href="http://www.phpconcept.net/pclzip/index.php" target="_blank"><font color="#206033" face="Comic Sans MS">pclzip</font></a>.</p>
<p>Maintenant, il faut créer un fichier ZIP (test.zip pour l'exemple) dans lequel on mettra tous nos fichiers à uploader sur le FTP.</p>
<p>Ensuite, il faut créer un fichier php (extract.php pour l'exemple) dans lequel on mettra le code suivant (à adapter selon votre cas) :</p>

<div class="wp_codebox"><table><tr id="p496"><td class="code" id="p49code6"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//Extrait de la documentation de la class.</span>
<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'pclzip.lib.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$archive</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> PclZip<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'test.zip'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//METTRE LE VRAI NOM DU ZIP ;)</span>
<span style="color: #666666; font-style: italic;">//Extrait dans le repertoire courant.</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$archive</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">extract</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <a href="http://www.php.net/die"><span style="color: #990000;">die</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Error : &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$archive</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">errorInfo</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>maintenant on se retrouve avec 3 fichiers :</p>
<ol>
<li>extract.php</li>
<li> pclzip.lib.php</li>
<li>test.zip</li>
</ol>
<p>On peut maintenant envoyer nos 3 fichiers dans le répertoire sensé accueillir les fichiers finaux (contenus dans le zip) sur le FTP.</p>
<p>maintenant prendre son navigateur et aller à l'url http://adresse_du_site.free.fr/repertoire/extract.php</p>
<p>et le tour est joué :-)</p>
<p>N.B. Cette procédure et valable pour tout hébergement mutualisé (ou pas) ne proposant pas les extensions PHP Zlib ou équivalent.</p>
]]></content:encoded>
			<wfw:commentRss>http://naeh.net/extraire-le-contenu-dun-zip-directement-sur-son-ftp-chez-free/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>Protéger un répertoire par htaccess</title>
		<link>http://naeh.net/proteger-un-repertoire-par-un-htaccess/</link>
		<comments>http://naeh.net/proteger-un-repertoire-par-un-htaccess/#comments</comments>
		<pubDate>Mon, 10 Mar 2008 23:18:34 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programmation]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Serveur]]></category>
		<category><![CDATA[vhost]]></category>

		<guid isPermaLink="false">http://naeh.net/proteger-un-repertoire-par-un-htaccess/</guid>
		<description><![CDATA[Le but de cet article est montrer comment protéger un répertoire par un htaccess.
pour cela il faut d'abord créer un fichier .htaccess à la racine du répertoire, ce fichier doit contenir  les lignes suivantes (a adapter selon la configuration/ besoins) :

AuthName &#34;Page protégée&#34;
AuthType Basic
AuthUserFile &#34;/CHEMIN/VERS/LE/FICHIER/.htpasswd&#34;
Require valid-user

en suite il faut créer un fichier .htpasswd qui [...]]]></description>
			<content:encoded><![CDATA[<p>Le but de cet article est montrer comment protéger un répertoire par un <strong>htaccess</strong>.</p>
<p>pour cela il faut d'abord créer un fichier <em>.htaccess</em> à la racine du répertoire, ce fichier doit contenir  les lignes suivantes (a adapter selon la configuration/ besoins) :</p>

<div class="wp_codebox"><table><tr id="p4810"><td class="code" id="p48code10"><pre class="bash" style="font-family:monospace;">AuthName <span style="color: #ff0000;">&quot;Page protégée&quot;</span>
AuthType Basic
AuthUserFile <span style="color: #ff0000;">&quot;/CHEMIN/VERS/LE/FICHIER/.htpasswd&quot;</span>
Require valid-user</pre></td></tr></table></div>

<p>en suite il faut créer un fichier <em>.htpasswd</em> qui lui contiendra les couples login/mot de passe qui auront accès au répertoire protégé.<br />
pour cela exécutez la commande suivante :</p>

<div class="wp_codebox"><table><tr id="p4811"><td class="code" id="p48code11"><pre class="bash" style="font-family:monospace;">htpasswd <span style="color: #660033;">-c</span> <span style="color: #000000; font-weight: bold;">/</span>CHEMIN<span style="color: #000000; font-weight: bold;">/</span>VERS<span style="color: #000000; font-weight: bold;">/</span>LE<span style="color: #000000; font-weight: bold;">/</span>FICHIER<span style="color: #000000; font-weight: bold;">/</span>.htpasswd LOGIN</pre></td></tr></table></div>

<p>-c pour créer un nouveau fichier <em>.htpasswd</em> (a ne pas utiliser si vous ajouter un utilisateur à un fichier existant).<br />
il vous sera ensuite demandé d'entrer le mot de passe 2 fois, faites le, et le tour est joué.</p>
<p>pour plus de renseignement sur la commande <strong>htpasswd</strong>, voici l'écran d'aide de ladite commande :</p>

<div class="wp_codebox"><table><tr id="p4812"><td class="code" id="p48code12"><pre class="bash" style="font-family:monospace;">$ htpasswd
Usage:
        htpasswd <span style="color: #7a0874; font-weight: bold;">&#91;</span>-cmdpsD<span style="color: #7a0874; font-weight: bold;">&#93;</span> passwordfile username
        htpasswd -b<span style="color: #7a0874; font-weight: bold;">&#91;</span>cmdpsD<span style="color: #7a0874; font-weight: bold;">&#93;</span> passwordfile username password
        htpasswd -n<span style="color: #7a0874; font-weight: bold;">&#91;</span>mdps<span style="color: #7a0874; font-weight: bold;">&#93;</span> username
        htpasswd -nb<span style="color: #7a0874; font-weight: bold;">&#91;</span>mdps<span style="color: #7a0874; font-weight: bold;">&#93;</span> username password
&nbsp;
 <span style="color: #660033;">-c</span>  Create a new file.
 <span style="color: #660033;">-n</span>  Don<span style="color: #ff0000;">'t update file; display results on stdout.
 -m  Force MD5 encryption of the password.
 -d  Force CRYPT encryption of the password (default).
 -p  Do not encrypt the password (plaintext).
 -s  Force SHA encryption of the password.
 -b  Use the password from the command line rather than prompting for it.
 -D  Delete the specified user.
On Windows, NetWare and TPF systems the '</span><span style="color: #660033;">-m</span><span style="color: #ff0000;">' flag is used by default.
On all other systems, the '</span><span style="color: #660033;">-p</span><span style="color: #ff0000;">' flag will probably not work.</span></pre></td></tr></table></div>

<p>notez aussi que pour que cette protection fonctionne, il est obligatoire de ne pas avoir la directive apache <strong>AllowOverride</strong> a none, sinon le fichier <em>.htaccess</em> ne sera pas pris en compte, donc n'oubliez pas de la commenter ou l'enlever tout simplement si vous l'avez dans votre <strong>vhost</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://naeh.net/proteger-un-repertoire-par-un-htaccess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Géolocalisation avec l&#8217;API Google et PHP</title>
		<link>http://naeh.net/geolocalisation-avec-lapi-google-et-php/</link>
		<comments>http://naeh.net/geolocalisation-avec-lapi-google-et-php/#comments</comments>
		<pubDate>Wed, 27 Feb 2008 14:05:43 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[PHP / MySQL]]></category>
		<category><![CDATA[Programmation]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[développement]]></category>
		<category><![CDATA[geoloc]]></category>
		<category><![CDATA[geolocalisation]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://naeh.net/geolocalisation-avec-lapi-google-et-php/</guid>
		<description><![CDATA[Parmi tous les services que propose les API google, on peut trouver des choses assez intéressantes, surtout en terme de géolocalisation avec l'API google maps et surtout très pratiques, dernièrement j'ai eu l'occasion de travailler avec le web service de géolocalisation, un outil très simple à utiliser et très pratique.
le but de la manipulation est [...]]]></description>
			<content:encoded><![CDATA[<p>Parmi tous les services que propose les <a href="http://code.google.com/more/#label=APIs">API google</a>, on peut trouver des choses assez intéressantes, surtout en terme de géolocalisation avec l'API google maps et surtout très pratiques, dernièrement j'ai eu l'occasion de travailler avec le <a href="http://code.google.com/apis/maps/documentation/services.html#Geocoding_Direct">web service de géolocalisation</a>, un outil très simple à utiliser et très pratique.</p>
<p>le but de la manipulation est d'obtenir la latitude et la longitude d'un point à partir de son adresse, pour cela, rien de bien méchant :</p>

<div class="wp_codebox"><table><tr id="p4514"><td class="code" id="p45code14"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$address</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'notre adresse'</span> <span style="color: #666666; font-style: italic;">//exemple : 5 rue du taur 31000 Toulouse</span>
&nbsp;
<span style="color: #000088;">$request</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'http://maps.google.com/maps/geo?'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$request</span> <span style="color: #339933;">.=</span><span style="color: #0000ff;">'q='</span><span style="color: #339933;">.</span><a href="http://www.php.net/urlencode"><span style="color: #990000;">urlencode</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$address</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$request</span> <span style="color: #339933;">.=</span><span style="color: #0000ff;">'&amp;key='</span><span style="color: #339933;">.</span>GOOGLE_API_KEY <span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Vous devez en avoir une comme pour toutes les API google.</span>
<span style="color: #000088;">$request</span> <span style="color: #339933;">.=</span><span style="color: #0000ff;">'&amp;output=csv'</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// on peut choisir d'autres format, c'est très bien expliqué dans lien du web service</span>
&nbsp;
<span style="color: #000088;">$response</span> <span style="color: #339933;">=</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;">$request</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// notre réponse est composée de 4 parties.</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//exemple de réponse : 200,6,42.730070,-73.690570</span>
<span style="color: #666666; font-style: italic;">//200 code réponse (200 =&gt; ok)</span>
<span style="color: #666666; font-style: italic;">//6 degré de précision</span>
<span style="color: #666666; font-style: italic;">//et les deux dernier sont les coordonnées du point que nous cherchons a géolocaliser.</span></pre></td></tr></table></div>

<p>et voilà avec ce bout de code très simple nous avons géolocalisé une adresse postale, chose très pratique, mais n'oublier pas la limitation qu'impose Google (50 000 requêtes par tranche de 24 heures).</p>
]]></content:encoded>
			<wfw:commentRss>http://naeh.net/geolocalisation-avec-lapi-google-et-php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Comment convertir un texte en UTF-8</title>
		<link>http://naeh.net/comment-convertir-un-texte-en-utf-8/</link>
		<comments>http://naeh.net/comment-convertir-un-texte-en-utf-8/#comments</comments>
		<pubDate>Mon, 25 Feb 2008 14:04:27 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[PHP / MySQL]]></category>
		<category><![CDATA[Programmation]]></category>
		<category><![CDATA[charset]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[decode]]></category>
		<category><![CDATA[encodage]]></category>
		<category><![CDATA[encode]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[utf-8]]></category>

		<guid isPermaLink="false">http://naeh.net/comment-convertir-un-texte-en-utf-8/</guid>
		<description><![CDATA[voici une fonction simple mais efficace pour convertir un texte en UTF-8 sans se préoccuper de sa provenance (encodage d'origine).

setlocale&#40;LC_ALL, 'fr_FR.utf8'&#41;; //selon la configuration du serveur cela peut être : fr_FR
&#160;
mb_detect_order&#40;array&#40;'UTF-8', 'ISO-8859-1', 'ISO-8859-15', 'Windows-1252'&#41;&#41;; //l'extention mb_string est installée par defaut sur php5
function toUTF8&#40;$string&#41;&#123;
&#160;
   $from = mb_detect_encoding&#40;$string&#41;;
&#160;
if &#40;$from != 'UTF-8'&#41; &#123;
&#160;
    [...]]]></description>
			<content:encoded><![CDATA[<p>voici une fonction simple mais efficace pour convertir un texte en UTF-8 sans se préoccuper de sa provenance (encodage d'origine).</p>

<div class="wp_codebox"><table><tr id="p4316"><td class="code" id="p43code16"><pre class="php" style="font-family:monospace;"><a href="http://www.php.net/setlocale"><span style="color: #990000;">setlocale</span></a><span style="color: #009900;">&#40;</span>LC_ALL<span style="color: #339933;">,</span> <span style="color: #0000ff;">'fr_FR.utf8'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//selon la configuration du serveur cela peut être : fr_FR</span>
&nbsp;
<a href="http://www.php.net/mb_detect_order"><span style="color: #990000;">mb_detect_order</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'UTF-8'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'ISO-8859-1'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'ISO-8859-15'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Windows-1252'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//l'extention mb_string est installée par defaut sur php5</span>
<span style="color: #000000; font-weight: bold;">function</span> toUTF8<span style="color: #009900;">&#40;</span><span style="color: #000088;">$string</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
   <span style="color: #000088;">$from</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/mb_detect_encoding"><span style="color: #990000;">mb_detect_encoding</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$string</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$from</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">'UTF-8'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
      <span style="color: #000088;">$string</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/mb_convert_encoding"><span style="color: #990000;">mb_convert_encoding</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$string</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'UTF-8'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$from</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #b1b100;">return</span> <span style="color: #000088;">$string</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://naeh.net/comment-convertir-un-texte-en-utf-8/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>L&#8217;internationalisation en extension PHP</title>
		<link>http://naeh.net/linternationalisation-en-extension-php/</link>
		<comments>http://naeh.net/linternationalisation-en-extension-php/#comments</comments>
		<pubDate>Sat, 15 Dec 2007 18:52:45 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[PHP / MySQL]]></category>
		<category><![CDATA[développement]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[internationalisation]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[langue]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[Programmation]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://naeh.net/index.php/linternationalisation-en-extension-php/</guid>
		<description><![CDATA[L'extension d'internationalisation est de localisation de PHP vient d'être annoncée en version Bêta, elle sera incluse dans PHP 5.3 (encore en développement).
Voici les premières classes disponibles :

Collator : Manipulation de chaînes ;
NumberFormatter : Manipulation de nombres ;
Locale : Informations sur la Locale ;
Normalizer : Uniformisation de texte en fonction de la locale ;
MessageFormatter : Construction [...]]]></description>
			<content:encoded><![CDATA[<p>L'extension d'internationalisation est de localisation de PHP vient d'être annoncée en version Bêta, elle sera incluse dans PHP 5.3 (encore en développement).</p>
<p>Voici les premières classes disponibles :</p>
<ul>
<li><strong>Collator</strong> : Manipulation de chaînes ;</li>
<li><strong>NumberFormatter</strong> : Manipulation de nombres ;</li>
<li><strong>Locale</strong> : Informations sur la Locale ;</li>
<li><strong>Normalizer</strong> : Uniformisation de texte en fonction de la locale ;</li>
<li><strong>MessageFormatter</strong> : Construction abstraite de texte à partir des autres objets de l'extension.</li>
</ul>
<p>Collator et FormatNumber permettent de travailler avec des chaînes et avec des nombres, de manière indépendante de la langue (ex : "français") et de la localisation (ex : "fr-CA" ou "fr-FR").<br />
Locale et Normalizer permettent d'intéragir plus en détail avec la localisation et avec du texte <em>localisé</em>.<br />
MessageFormatter est le maître d'orchestre, un nouveau sprintf() en quelque sorte.</p>
<p>L'annonce : <a href="http://php100.wordpress.com/2007/12/12/icuphplove/">http://php100.wordpress.com/2007/12/12/icuphplove/</a><br />
La documentation : <a href="http://docs.php.net/manual/en/book.intl.php">http://docs.php.net/manual/en/book.intl.php</a><br />
Téléchargement : <a href="http://pecl.php.net/package/intl">http://pecl.php.net/package/intl</a></p>
<p>Source : <a href="http://blog.developpez.com/index.php?blog=102&amp;title=l_internationalisation_arrive_enfin_en_e&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1" target="_blank">Developpez.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://naeh.net/linternationalisation-en-extension-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Planète PHP</title>
		<link>http://naeh.net/planete-php/</link>
		<comments>http://naeh.net/planete-php/#comments</comments>
		<pubDate>Thu, 13 Dec 2007 22:15:19 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[Divers]]></category>
		<category><![CDATA[développement]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[Zend]]></category>

		<guid isPermaLink="false">http://naeh.net/index.php/planete-php/</guid>
		<description><![CDATA[L'Association des Utilisateurs de PHP (AFUP) propose dès aujourd'hui un nouveau site 'Planète PHP'.
Ce nouveau site regroupe l'ensemble des blogs et sites francophones parlant surtout de PHP.
Un très bon site dont la plus part des blogs partenaires sont très actifs sur la scene PHP. Un site complémentaire du site de Nexen.net
Planete PHP
]]></description>
			<content:encoded><![CDATA[<p>L'Association des Utilisateurs de PHP (AFUP) propose dès aujourd'hui un nouveau site 'Planète PHP'.</p>
<p>Ce nouveau site regroupe l'ensemble des blogs et sites francophones parlant surtout de PHP.</p>
<p>Un très bon site dont la plus part des blogs partenaires sont très actifs sur la scene PHP. Un site complémentaire du site de <a href="http://nexen.net" target="_blank">Nexen.net</a></p>
<p><a href="http://www.planete-php.fr/" target="_blank">Planete PHP</a></p>
]]></content:encoded>
			<wfw:commentRss>http://naeh.net/planete-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Le Web 3 à Paris, place aux conférences</title>
		<link>http://naeh.net/le-web-3-a-paris-place-aux-conferences/</link>
		<comments>http://naeh.net/le-web-3-a-paris-place-aux-conferences/#comments</comments>
		<pubDate>Wed, 12 Dec 2007 20:14:53 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[Divers]]></category>
		<category><![CDATA[conférence]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[Paris]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web 3]]></category>

		<guid isPermaLink="false">http://naeh.net/index.php/le-web-3-a-paris-place-aux-conferences/</guid>
		<description><![CDATA[Pendant 2 jours plus de 1800 participants, plus de 110 intervenants, sur plus de 6000m2 avec la présence des poids lourds du web ; Google, Microsoft, Facebook, etc. le Web 3 a tout pour être une réussite...
On remarquera que cette années les politiques ne sont plus sur la scène, normal y a plus d'élections ^^
En [...]]]></description>
			<content:encoded><![CDATA[<p>Pendant 2 jours plus de 1800 participants, plus de 110 intervenants, sur plus de 6000m<sup>2</sup> avec la présence des poids lourds du web ; Google, Microsoft, Facebook, etc. le Web 3 a tout pour être une réussite...</p>
<p>On remarquera que cette années les politiques ne sont plus sur la scène, normal y a plus d'élections ^^</p>
<p>En gros cette années les participants se sont concentré sur 3 thèmes :</p>
<ol>
<li>Un web encore plus social</li>
<li>Un web plus mobile</li>
<li>Encore plus de vidéo sur le web</li>
</ol>
<p>c'est ce que sera le Web 3, autrement dit le web de demain, alors, allez tous vous inscrire sur des réseaux sociaux, achetez tous des Iphones ou des Nokia N95 8Go, et rendez-vous sur Youtube :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://naeh.net/le-web-3-a-paris-place-aux-conferences/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nexen : 33,29% des sites Web sous PHP en novembre 2007</title>
		<link>http://naeh.net/nexen-3329-des-sites-web-sous-php-en-novembre-2007/</link>
		<comments>http://naeh.net/nexen-3329-des-sites-web-sous-php-en-novembre-2007/#comments</comments>
		<pubDate>Tue, 11 Dec 2007 13:02:45 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[PHP / MySQL]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[développement]]></category>
		<category><![CDATA[Nexen]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[Zend]]></category>

		<guid isPermaLink="false">http://naeh.net/index.php/nexen-3329-des-sites-web-sous-php-en-novembre-2007/</guid>
		<description><![CDATA[es statistiques de diffusion PHP dans le monde pour novembre 2007 sont arrivées chez Nexen. PHP 5 toujours vigoureux, atteint la barre des 26 %. PHP 4.3 devrait lui passer derrière PHP 5.2 dans les prochains mois
28.7 millions de serveurs ont été testés durant le mois de novembre 2007, et 11.2 millions ont été retenus [...]]]></description>
			<content:encoded><![CDATA[<p>es statistiques de diffusion PHP dans le monde pour novembre 2007 sont arrivées chez Nexen. PHP 5 toujours vigoureux, atteint la barre des 26 %. PHP 4.3 devrait lui passer derrière PHP 5.2 dans les prochains mois</p>
<p>28.7 millions de serveurs ont été testés durant le mois de novembre 2007, et 11.2 millions ont été retenus pour les statistiques. On remarque que PHP 5.2.x perdent du terrain, au profit de PHP 5.2.4. Autrement, PHP 4.4.x perd souvent des utilisateurs, sauf PHP 4.4.7.</p>
<p>PHP est présent sur 33,29% des sites Web au mois de novembre 2007. Les chiffres sont stables depuis le mois dernier, pour PHP comme pour ASP. La moyenne mondiale est de 26,13 % pour PHP 5.</p>
<ul>
<li><a href="http://www.nexen.net/chiffres_cles/phpversion/17876-evolution_de_php_sur_internet_novembre_2007.php" target="_blank">Evolution de PHP sur Internet (novembre 2007)</a></li>
<li><a href="http://www.nexen.net/chiffres_cles/phpversion/17877-statistiques_de_deploiement_de_php_de_novembre_2007.php" target="_blank">Statistiques de déploiement de PHP de novembre 2007</a></li>
</ul>
<p>Source : <a href="http://www.toolinux.com" target="_blank">Toolinux.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://naeh.net/nexen-3329-des-sites-web-sous-php-en-novembre-2007/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
