<?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>nFrey.com &#124; Nicolas FREY</title>
	<atom:link href="http://www.nfrey.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nfrey.com</link>
	<description>Fais du Web 2.0 un idéal, et d'un idéal une réalité</description>
	<lastBuildDate>Fri, 27 Feb 2009 14:59:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Mozilla Firefox &#8211; Extensions et développement</title>
		<link>http://www.nfrey.com/internet/extension-firefox-dev/</link>
		<comments>http://www.nfrey.com/internet/extension-firefox-dev/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 14:24:45 +0000</pubDate>
		<dc:creator>Nicolas Frey</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[Firefox]]></category>

		<guid isPermaLink="false">http://www.nfrey.com/?p=100</guid>
		<description><![CDATA[Mozilla Firefox est l'un de mes navigateurs préférés. Pas seulement pour développer, mais aussi pour ses performances, son interface, et son lot d'extension fort sympatique.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mozilla-europe.org/fr/firefox/" target="_blank">Mozilla Firefox</a> est l&#8217;un de mes navigateurs préférés. Pas seulement pour développer, mais aussi pour ses performances, son interface, et son lot d&#8217;extensions fort sympathique.</p>
<p><span id="more-100"></span>Il existe de nombreuses extensions qui apportent un gain considérable dans l&#8217;utilisation de Firefox. Voici la liste des extensions que l&#8217;utilise couramment:</p>
<ul>
<li><strong>Adblock Plu</strong>s: Pour supprimer la publicité</li>
<li><strong>DownloadThemAll</strong>: Pour accélérer les téléchargements</li>
<li><strong>Firebug</strong>: Pour déboguer une page html/javascript</li>
<li><strong>Foxmark</strong>: Pour sauvegarder marque-pages et mots de passe</li>
<li><strong>Tab Mix Plus</strong>: Pour une gestion améliorée des onglets</li>
<li><strong>Web Developer</strong>: Une barre d&#8217;outils pour le développement</li>
</ul>
<p>Tous ses outils sont vraiment très bien, je vous propose donc deux liens qui vous les présentent plus précisément.</p>
<ul>
<li><strong>Alsacreations<br />
 </strong>Vous y trouverez un article qui reprends les 20 meilleures extensions Firefox pour développeurs web. (<a href="https://addons.mozilla.org/fr/firefox/addon/1843" target="_blank">Firebug</a>, <a href="https://addons.mozilla.org/fr/firefox/addon/60" target="_blank">WebDeveloper Toolbar</a>, <a href="https://addons.mozilla.org/en-US/firefox/addon/249" target="_blank">Validateurs</a>, <a href="https://addons.mozilla.org/fr/firefox/addon/35" target="_blank">IE Tab</a>, <a href="https://addons.mozilla.org/fr/firefox/addon/271" target="_blank">Colorzilla</a>, <a href="https://addons.mozilla.org/fr/firefox/addon/5648" target="_blank">Fireshot</a>, <a href="https://addons.mozilla.org/fr/firefox/addon/5392" target="_blank">Dust-me Selectors</a>, <a href="https://addons.mozilla.org/en-US/firefox/addon/539" target="_blank">MeasureIt</a>, <a href="http://smush.it/" target="_blank">SmushIt</a>, <a href="https://addons.mozilla.org/en-US/firefox/addon/6149" target="_blank">FirePHP</a>, <a href="https://addons.mozilla.org/en-US/firefox/addon/3829" target="_blank">Live HTTP Headers</a>, <a href="https://addons.mozilla.org/fr/firefox/addon/1802" target="_blank">X-Ray</a>, <a href="https://addons.mozilla.org/fr/firefox/addon/748" target="_blank">Greasemonkey</a>, &#8230;)<br />
 Voici le lien: <a href="http://www.alsacreations.com/actu/lire/645-les-20-meilleures-extensions-firefox-pour-dveloppeurs-web.html" target="_blank">http://www.alsacreations.com</a></li>
<li><strong>Developpez.com</strong><br />
 Vous y trouverez un article sur les meilleurs extensions Firefox. Principalement orienté pour le développeur. (<a href="http://adblock.mozdev.org/" target="_blank">Adblock</a>, <a href="https://addons.mozilla.org/fr/firefox/addon/35" target="_blank">IE tab</a>, <a href="http://extensions.geckozone.org/GetJetableMail" target="_blank">GetJetableMail</a>, <a href="http://extensions.geckozone.org/TabMixPlus" target="_blank">Tab Mix plus</a>, <a href="http://extensions.geckozone.org/ScrapBook" target="_blank">ScrapBook</a>, <a href="http://joliclic.free.fr/mozilla/webdeveloper/" target="_blank">Web developer</a>, <a href="https://addons.mozilla.org/firefox/918/" target="_blank">Gtranslate</a>, <a href="http://extensions.geckozone.org/FireFTP" target="_blank">FireFTP</a>, <a href="http://frenchmozilla.sourceforge.net/cz/" target="_blank">ChatZilla</a>, <a href="https://addons.mozilla.org/firefox/135/" target="_blank">SecurePassword</a>, <a href="https://addons.mozilla.org/firefox/655/" target="_blank">View Source Chart</a>, <a href="https://addons.mozilla.org/firefox/1843/" target="_blank">Firebug</a>, &#8230;)<br />
 Voici le lien: <a href="http://lgmorand.developpez.com/articles/extensions-firefox/" target="_blank">http://www.developpez.com</a></li>
</ul>
<p>Avec ces deux articles, vous voilà parti pour travailler plus facilement et proprement avec Firefox.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nfrey.com/internet/extension-firefox-dev/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sortie des EzComponents 2008.2</title>
		<link>http://www.nfrey.com/ezpublish/ezcomponent-20082/</link>
		<comments>http://www.nfrey.com/ezpublish/ezcomponent-20082/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 11:51:26 +0000</pubDate>
		<dc:creator>Nicolas Frey</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[eZPublish]]></category>
		<category><![CDATA[ezcomponents]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.nfrey.com/?p=238</guid>
		<description><![CDATA[Chose promise chose due, avec très peu de retard les nouveaux EzComponents viennent de voir le jour.]]></description>
			<content:encoded><![CDATA[<p>Chose promise chose due, avec très peu de retard les nouveaux EzComponents viennent de voir le jour.</p>
<p><span id="more-238"></span></p>
<h2>EzComponent c&#8217;est quoi ?</h2>
<p><a href="http://ez.no/fr/ezcomponents" target="_blank">eZ Components</a> sont des librairies PHP prêtes à l&#8217;emploi dédiées aux entreprises qui peuvent être utilisées ensemble ou de manière indépendante pour le développement d&#8217;applications PHP. Avec <a href="http://ez.no/fr/ezcomponents" target="_blank">eZ Components</a>, les développeurs peuvent se concentrer sur les besoins spécifiques à leurs applications sans à avoir à tout réinventer. Les dernières versions d&#8217; <a href="http://ez.no/fr/ezpublish">eZ Publish</a> sont basées sur <a href="http://ez.no/fr/ezcomponents" target="_blank">eZ Components</a>.</p>
<h2>Les nouveautés pour 2009<br class="spacer_" /></h2>
<ul>
<li>Amélioration du composant MVC tools, qui permet une meilleure utilisation du modèle <a href="http://fr.wikipedia.org/wiki/Mod%C3%A8le-Vue-Contr%C3%B4leur" target="_blank">MVC</a>.</li>
<li>De nouveaux formats sont pris en charge par le composant Document  (Confluence, Creole et DokuWiki), qui permet la conversion de documents sous différents formats. Il est par exemple possible de convertir du ReST en XHTML ou DocBook.</li>
<li>Le composant Webdav a été également amélioré et supporte maintenant l&#8217;authentification et la gestion des autorisations</li>
<li>Pour cette version, l&#8217;équipe de développeurs a corrigé, 55 bugs et implémenté 43 nouvelles fonctionnalités.</li>
</ul>
<p>Par rapport à la roadmap, il me semblait qu&#8217;il devait y avoir des changements sur les fluxRSS et la gestion du cache, mais je n&#8217;ai rien trouvé qui en parlait. Surement dans la prochaine version&#8230;</p>
<p><br class="spacer_" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nfrey.com/ezpublish/ezcomponent-20082/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sortie de Zend Framework 1.7.0</title>
		<link>http://www.nfrey.com/zendframework/zend-framework-17/</link>
		<comments>http://www.nfrey.com/zendframework/zend-framework-17/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 13:50:50 +0000</pubDate>
		<dc:creator>Nicolas Frey</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://www.nfrey.com/?p=209</guid>
		<description><![CDATA[Zend et Adobe ont annoncé, lors du salon Adobe MAX, la sortie de la version 1.7 du Zend Framework. Celui ci supporte désormais le format Zend_AMF (Action script Messaging Format). Les deux sociétés se sont associées afin de rendre plus facile le développement d'applications Internet Riches basées sur l'intégration de PHP et du framework Flex.]]></description>
			<content:encoded><![CDATA[<p><span style="font-size: 8.5pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><a href="http://www.zend.com/fr/" target="_blank">Zend</a> et <a href="http://www.adobe.com/" target="_blank">Adobe</a> ont annoncé, lors</span><span style="font-size: 8.5pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> du salon <a href="http://max.adobe.com/" target="_blank">Adobe MAX</a>, la sortie de la version 1.7 du Zend Framework. Celui ci supporte désormais le format Zend_AMF (Action script Messaging Format). </span><span style="font-size: 8.5pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Les deux sociétés se sont associées afin de rendre plus facile le développement d&#8217;applications Internet Riches basées sur l&#8217;intégration de PHP et de <a href="http://www.adobe.com/fr/products/flex/" target="_blank">Flex</a>.</span></p>
<p><span id="more-209"></span>La nouvelle version du Zend Framework est disponible en téléchargement depuis <a href="http://framework.zend.com/">le site de Zend</a>. Et voici la liste des nouveautés:</p>
<ul>
<li style="text-align: left;">Zend_Amf avec support des protocoles AMF0 et AMF3. (Pour flex) </li>
<li style="text-align: left;"><a href="http://dojotoolkit.org/" target="_blank">Dojo Toolkit 1.2.1</a></li>
<li style="text-align: left;">Gestion du <a href="http://dojotoolkit.org/book/dojo-book-0-9/part-2-dijit/advanced-editing-and-display/editor-rich-text" target="_blank">Dijit Editor</a>, un éditeur WYSIWYG Dojo. </li>
<li style="text-align: left;">Zend_Service_Twitter: Implémentation de l&#8217;API Twitter </li>
<li style="text-align: left;">ZendX_JQuery. Un helper pour simplifier l&#8217;utilisation de <a href="http://jquery.com/" target="_blank">jQuery</a> et <a href="http://ui.jquery.com/" target="_blank">UI jQuery</a> </li>
<li style="text-align: left;">Zend_Cache: Une API gérant les Métadata </li>
<li style="text-align: left;">Zend_Gdata: Une API de recherche Google book </li>
<li style="text-align: left;">Zend_Gdata: Gestion préliminaire du Protocole version 2 de GData. </li>
<li style="text-align: left;">Zend_Search_Lucene: &laquo;&nbsp;Skip data processing&nbsp;&raquo;</li>
<li style="text-align: left;">Zend_Search_Lucene: Indexation de document Open Office XML </li>
<li style="text-align: left;">Amélioration des performances dans Zend_Loader, Zend_Controller, et les composants serveurs </li>
<li style="text-align: left;">Zend_Mail_Storage_Writable_Maildir: Amélioration de l&#8217;envoi de mail</li>
<li style="text-align: left;">Zend_Tool: Dans l&#8217;incubateur (Webservice, gestion de projet, et Génération de code)</li>
<li style="text-align: left;">Zend_Text_Table: Pour la mise en forme de tableau de type texte. </li>
<li style="text-align: left;">Zend_ProgressBar: Pour créer et mettre à jour les barres de progression dans différents environnements. </li>
<li style="text-align: left;">Zend_Config_Writer: Pour la création de fichiers de configuration à partir d&#8217;objets Zend_Config. </li>
<li style="text-align: left;">ZendX_Console_Unix_Process: Permet de créer des processus s&#8217;exécutant dans un shell. </li>
<li style="text-align: left;">Zend_Db_Table_Select: Gestion du &laquo;&nbsp;Zend_Paginator&nbsp;&raquo; pour la pagination des données. </li>
<li style="text-align: left;">Paramètres globaux pour les routes. </li>
<li style="text-align: left;">Utilisation des Routes Chainées pour les Hostname-Routes via Zend_Config. </li>
<li style="text-align: left;">Amélioration I18N (Internationalisation)
<ul>
<li style="text-align: left;">Zend_Translate API simplifié, mise à jour des méthodes de gestion du cache&#8230; </li>
</ul>
</li>
<li style="text-align: left;">Amélioration du transfert de fichier
<ul>
<li>Gestion des &laquo;&nbsp;file elements&nbsp;&raquo; dans les &laquo;&nbsp;subforms&nbsp;&raquo;</li>
<li>Gestion des &laquo;&nbsp;multifiles elements&nbsp;&raquo;</li>
<li>Gestion du &laquo;&nbsp;MAX_FILES_SIZE&nbsp;&raquo; dans un formulaire</li>
<li>Gestion des erreurs dans la chaine de validation</li>
<li>Gestion de la traduction sur les erreurs et les messages. </li>
<li>Nouveau validateur: IsCompressed, IsImage, ExcludeMimeType, ExcludeExtension</li>
<li>Gestion du &laquo;&nbsp;FileInfo&nbsp;&raquo; dans le &laquo;&nbsp;MimeType&nbsp;&raquo; validateur</li>
</ul>
</li>
<li style="text-align: left;">Gestion d&#8217;adaptateur personnalisé dans &laquo;&nbsp;Zend_Paginator&nbsp;&raquo;</li>
<li style="text-align: left;">Plus de liberté dans la gestion des types complexes dans &laquo;&nbsp;Zend_Soap&nbsp;&raquo;</li>
<li style="text-align: left;">Et beaucoup de bugs de corrigés &#8230;</li>
</ul>
<p>Ce Framework est vraiment prometteur, après une version 1.5 très riche en nouveautés notamment autour de la gestion de formulaires, des layouts et du support d&#8217;AJAX. La version 1.7 apporte un bon nombre de changements appréciables et les idées n&#8217;ont pas l&#8217;air de manquer pour les prochaines versions &#8230;.</p>
<p>A quand mon prochain projet Zend que je puisse m&#8217;amuser un peu avec toutes ses nouveautés ?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nfrey.com/zendframework/zend-framework-17/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Journée développeur eZpublish à Paris (7 novembre 2008)</title>
		<link>http://www.nfrey.com/ezpublish/ez-developer-day-7-11-08/</link>
		<comments>http://www.nfrey.com/ezpublish/ez-developer-day-7-11-08/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 10:16:59 +0000</pubDate>
		<dc:creator>Nicolas Frey</dc:creator>
				<category><![CDATA[eZPublish]]></category>
		<category><![CDATA[ez]]></category>
		<category><![CDATA[opensource]]></category>

		<guid isPermaLink="false">http://www.nfrey.com/?p=193</guid>
		<description><![CDATA[Le Vendredi 7 novembre 2008, eZ Systems a réuni les développeurs de la communauté française pour discuter autour d'eZpublish.]]></description>
			<content:encoded><![CDATA[<p>Le Vendredi 7 novembre 2008, <a href="http://ez.no">eZ Systems</a> a réuni les développeurs de la communauté française pour discuter autour d&#8217;<a href="http://ez.no">ezpublish</a>.</p>
<p><span id="more-193"></span><a hreflang="en" href="http://ez.no/company/ez_crew/belgium">Paul Borgermans</a> a animé cet après-midi, en commençant par présenter la roadmaps d&#8217;eZ Systems. Au programme, <a hreflang="fr" href="http://ez.no/">eZ publish</a>, <a hreflang="fr" href="http://ez.no/fr/ezcomponents">eZ components</a>, <a hreflang="fr" href="http://ez.no/fr/ezflow">eZ flow</a>, <a hreflang="fr" href="http://ez.no/fr/ezfind">eZ find</a> &#8230;</p>
<h2>eZ publish 4.1</h2>
<p>Ezpublish 4.1 est prévu pour la fin de l&#8217;année 2008 voir &laquo;&nbsp;Au pire début 2009&#8243;. Voici la liste des évolutions:</p>
<ul>
<li>Support d&#8217;Oracle</li>
<li>Nouveau Online Editor (Permettant le fonctionnement sous IE7 Vista, et améliorant l&#8217;ergonomie)</li>
<li>Support Solaris 10</li>
<li>Object States (Système de section qui permettra aux noeuds d&#8217;avoir des états différents) </li>
<li>Publication via WebDAV</li>
<li>Amélioration du cache (meilleure performance et re-génération du cache en background)</li>
</ul>
<h3>Les extentions</h3>
<p>Deux extentions devraient voir le jour prochainement:</p>
<ul>
<li><strong>Password expiry extension</strong>: Devrait permettre de fixer une durée de validité aux mots de passe.</li>
<li><strong>Multi-file upload</strong>: Qui permettra l&#8217;envoi de fichier multiple. Il semblerait néanmoins que des problèmes avec Flash 10 retarde un peu la sortie.</li>
</ul>
<h2>Ez Flow 1.1</h2>
<p>EzFlow est une extension principalement orientée média. Elle permet le positionnement et la rotation des contenus. Voici la liste des nouveautés:</p>
<ul>
<li>L&#8217;amélioration de la gestion de la publication temporisée</li>
<li>Drag &amp; Drop d&#8217;éléments dans l&#8217;interface de contribution</li>
<li>Sauvegarde du bloc lors du changement de layout</li>
<li>Amélioration du eZSquidCacheManager</li>
<li>Paramétrage possible des blocs pour ne remonter que les objets de certaines classes</li>
<li>Support de l&#8217;interface sur iPhone / iPod Touch</li>
<li>Compatibilité totale avec eZ Flow 1.0</li>
</ul>
<h2>eZ Find 2.0</h2>
<p>La version 1.1 de eZ Find ne sortira jamais. Les modifications étant jugées trop importantes, Paul Borgermans a pensé que ces évolutions méritaient de passer à une version majeure supérieure.<br />
 Le moteur de recherche étant le point d&#8217;entrée pour 30% des utilisateurs les modifications apportées ont donc été nombreuses:</p>
<ul>
<li>Relevacy Ranking: Amélioration du classement par pertinence</li>
<li>Keyword Highlight: Mise en surbrillance des mots clés recherchés dans le résultat de recherche</li>
<li>Possibilité de tuner le ranking</li>
<li>Ajout de filtres (par classe)</li>
<li>Ajout des facettes (interface de navigation)</li>
<li>Indexation externe</li>
<li>Boosting (augmentation de la pertinence) : Par classe, par Attribut, nombre de relations d&#8217;objets &#8230; </li>
<li>Filtrage : Nouveau fetchs dans eZpublish</li>
<li>Sorting</li>
<li>&laquo;&nbsp;More Like This&nbsp;&raquo; (Système automatique basé sur des statistiques et heuristiques)</li>
<li>Spell Checking: Système de proposition de mot corrigé</li>
<li>Gestion des langues dans la recherche</li>
<li>Stemming pour chaque langue: (réduire les mots à une forme commune : sans les pluriels, etc…)</li>
<li>Indexation contenu externe : DB ou XML / HTML via un plugin</li>
<li>Rapidité</li>
<li>Sécurité des accès</li>
</ul>
<h2>eZ Publish 4.2</h2>
<p>Prévue pour le 2ème trimestre 2009. La modification principale serait la gestion des droits sur les attributs des classes de contenus.</p>
<h2>eZ Components 2008.2</h2>
<p>Prévue pour la fin de l&#8217;année 2008. Les améliorations sont:</p>
<ul>
<li>Flux RSS</li>
<li>Gestion du cache hiérarchique</li>
<li>Gestion des documents aux formats : ezXML / ReST / wiki / xhtml</li>
<li>Amélioration des MVC tools</li>
</ul>
<h2>eZ Publish Project V</h2>
<p>Ce serait un eZpublish complèment remodelé, en exploitant au maximum les ezComponents et la future version de php en 5.3. Les principales améliorations seraient:</p>
<ul>
<li>Refactoring partiel avec eZ Components</li>
<li>Mise en place d&#8217;un micro-kernel &amp; un système d&#8217;extensions</li>
<li>Optimisations du kernel</li>
<li>Request blocker: Choix d&#8217;un kernel et ou d&#8217;un module.</li>
<li>Système de stockage flexible</li>
<li>Choix d&#8217;un moteur de template (Smarty, PHP)</li>
</ul>
<h2>Prochain rendez-vous</h2>
<p>International Developer Day prévu pour le 29 janvier à Barcelone et en anglais.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nfrey.com/ezpublish/ez-developer-day-7-11-08/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Une URL raccourcie sur votre domaine &#8230; pourquoi pas vous ?</title>
		<link>http://www.nfrey.com/internet/tinyurl/</link>
		<comments>http://www.nfrey.com/internet/tinyurl/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 13:43:20 +0000</pubDate>
		<dc:creator>Nicolas Frey</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[courte]]></category>
		<category><![CDATA[raccourci]]></category>
		<category><![CDATA[short]]></category>
		<category><![CDATA[tinyurl]]></category>
		<category><![CDATA[url]]></category>

		<guid isPermaLink="false">http://www.nfrey.com/?p=132</guid>
		<description><![CDATA[Il existe beaucoup de site pour faire des URL courte mais pourquoi ne pas le faire sur votre propre domaine ? ]]></description>
			<content:encoded><![CDATA[<p>Il existe beaucoup de site pour faire des raccourcies URL mais pourquoi ne pas le faire sur votre propre domaine ?</p>
<p><span id="more-132"></span></p>
<p>Le développement est relativement simple, il suffit d&#8217;un serveur acceptant le <a href="http://fr.wikipedia.org/wiki/PHP:_Hypertext_Preprocessor" target="_blank">PHP</a>, d&#8217;une base de données et si possible la redirection d&#8217;url activé (<a href="http://en.wikipedia.org/wiki/Rewrite_engine" target="_blank">mod_rewrite</a> sous <a href="http://www.apache.org/" target="_blank">Apache</a>). Le développement tient dans un script et un fichier .htaccess pour la redirection des URL.</p>
<p>La base de données contient une table avec un identifiant unique qui représente la clé d&#8217;accès et l&#8217;URL du lien sur lequel on veut rediriger.</p>

<div class="wp_codebox"><table><tr id="p1321"><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code" id="p132code1"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #ff0000;">`tinyurl`</span> <span style="color: #66cc66;">&#40;</span>
  <span style="color: #ff0000;">`hash`</span> varchar<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">16</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
  <span style="color: #ff0000;">`url`</span> varchar<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">default</span> <span style="color: #ff0000;">''</span><span style="color: #66cc66;">,</span>
  <span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span>  <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">`hash`</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

<p>Le script PHP est loin d&#8217;être du code objet ou encore utiliser Zend Framework, mais pour un petit outil du genre un bon vieux code en procédural devrait faire l&#8217;affaire. Le script n&#8217;est pas très complexe. On a une partie pour afficher le formulaire, une fonction pour la création du hash, l&#8217;enregistrement dans la base de données et une fonction pour rechercher l&#8217;URL associé au <a href="http://fr.wikipedia.org/wiki/Hash" target="_blank">hash</a>.</p>

<div class="wp_codebox"><table><tr id="p1322"><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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
</pre></td><td class="code" id="p132code2"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Fichier qui contient les paramètres de connexion.</span>
<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'config.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * Connexion à la base de donnée
 */</span>
<span style="color: #000088;">$conn</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span>DB_HOST<span style="color: #339933;">,</span> DB_USER<span style="color: #339933;">,</span> DB_PASSWORD<span style="color: #009900;">&#41;</span>
        or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Impossible de se connecter&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$db</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_select_db</span><span style="color: #009900;">&#40;</span>DB_NAME<span style="color: #339933;">,</span> <span style="color: #000088;">$conn</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$table</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;tinyurl&quot;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'HASHSIZE'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'5'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Taille du hash</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * Recherche par rapport au hash passé en paramètre
 * et redirection sur l'URL.
 */</span>
<span style="color: #000000; font-weight: bold;">function</span> renvoyer<span style="color: #009900;">&#40;</span><span style="color: #000088;">$hash</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$table</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>is_hash<span style="color: #009900;">&#40;</span><span style="color: #000088;">$hash</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
     <span style="color: #000088;">$req</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT * FROM <span style="color: #006699; font-weight: bold;">$table</span> WHERE hash = '<span style="color: #006699; font-weight: bold;">$hash</span>';&quot;</span><span style="color: #339933;">;</span>
     <span style="color: #000088;">$res</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$req</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Query failed&quot;</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: #990000;">mysql_num_rows</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$res</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>
       <span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;Aucun id associé&quot;</span><span style="color: #339933;">;</span>
       <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
     <span style="color: #009900;">&#125;</span>
     <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
       <span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Location: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">mysql_result</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$res</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;url&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
       <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
     <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * Enregistrement de l'url avant son identifiant.
 */</span>
<span style="color: #000000; font-weight: bold;">function</span> enregistrer<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$url</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$table</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span>is_url<span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">print</span> <span style="color: #0000cc; font-style: italic;">&lt;&lt;&lt;HTML
                 &lt;span class=&quot;error&quot;&gt;
                    &lt;i&gt;{$url}&lt;/i&gt; n'est pas une url valide
                 &lt;/span&gt;
HTML</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>
&nbsp;
   <span style="color: #666666; font-style: italic;">// Test si l'url existe déjà et retourne le hash correspondant.</span>
   <span style="color: #666666; font-style: italic;">// Évite les doublons inutiles.</span>
   <span style="color: #000088;">$req</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT hash FROM <span style="color: #006699; font-weight: bold;">$table</span> WHERE url= '<span style="color: #006699; font-weight: bold;">$url</span>';&quot;</span><span style="color: #339933;">;</span>
   <span style="color: #000088;">$res</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$req</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Query failed&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #666666; font-style: italic;">// L'url existe déjà dans la base de données</span>
   <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">mysql_num_rows</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$res</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000088;">$hash</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_result</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$res</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;hash&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #666666; font-style: italic;">// A modifier en fonction de votre .htaccess et</span>
      <span style="color: #666666; font-style: italic;">// des redirections d'url</span>
      <span style="color: #000088;">$adresse</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://votredomain/&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$hash</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">print</span> <span style="color: #0000cc; font-style: italic;">&lt;&lt;&lt;HTML
		&lt;span class=&quot;info&quot;&gt;
                   Voici votre URL r&amp;amp;eacute;duite :
                &lt;/span&gt;
&nbsp;
{$adresse}
&nbsp;
HTML</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #009900;">&#125;</span>
&nbsp;
   <span style="color: #666666; font-style: italic;">// L'url n'existe pas encore</span>
   <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
&nbsp;
      <span style="color: #666666; font-style: italic;">// Recherche un identifiant valide</span>
      <span style="color: #000088;">$ok</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span> <span style="color: #000088;">$count</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$ok</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
         <span style="color: #666666; font-style: italic;">// Génération d'un hash</span>
	 <span style="color: #000088;">$hash</span> <span style="color: #339933;">=</span> generateHash<span style="color: #009900;">&#40;</span>HASHSIZE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	 <span style="color: #666666; font-style: italic;">// Test si le hash n'existe pas déjà dans la base de données</span>
  	 <span style="color: #000088;">$req</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT hash FROM <span style="color: #006699; font-weight: bold;">$table</span> WHERE hash= '<span style="color: #006699; font-weight: bold;">$hash</span>';&quot;</span><span style="color: #339933;">;</span>
	 <span style="color: #000088;">$res</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$req</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Query failed&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
         <span style="color: #666666; font-style: italic;">// Aucun résultat le hash est donc dispo</span>
         <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">mysql_num_rows</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$res</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: #000088;">$ok</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
&nbsp;
         <span style="color: #666666; font-style: italic;">// Nombre de tentative dépassée on arrête.</span>
         <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">++</span><span style="color: #000088;">$count</span> <span style="color: #339933;">&gt;=</span> <span style="color: #cc66cc;">10</span> <span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
&nbsp;
      <span style="color: #666666; font-style: italic;">// Insertion de l'url dans la base de données</span>
      <span style="color: #000088;">$req</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;INSERT INTO <span style="color: #006699; font-weight: bold;">$table</span> (hash, url) VALUES ('<span style="color: #006699; font-weight: bold;">$hash</span>', '<span style="color: #006699; font-weight: bold;">$url</span>');&quot;</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #666666; font-style: italic;">// Insertion ok</span>
      <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$req</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
         <span style="color: #000088;">$adresse</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://nfrey.com/&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$hash</span><span style="color: #339933;">;</span>
	 <span style="color: #b1b100;">print</span> <span style="color: #0000cc; font-style: italic;">&lt;&lt;&lt;HTML
	  	   &lt;span class=&quot;info&quot;&gt;
                       Voici votre URL r&amp;amp;eacute;duite :
                   &lt;/span&gt;
&nbsp;
{$adresse}
&nbsp;
HTML</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
&nbsp;
      <span style="color: #666666; font-style: italic;">// Erreur d'insertion</span>
      <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
         <span style="color: #b1b100;">print</span> <span style="color: #0000cc; font-style: italic;">&lt;&lt;&lt;HTML
		   &lt;span class=&quot;error&quot;&gt;
                      Une erreur s'est produite.
                   &lt;/span&gt;
HTML</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
   <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * Vérification de l'url
 * La regex doit être grandement améliorée pour prendre en compte
 * tous les types d'url possible.
 * ex: protocole://sdo.domain.ext:port/dossier/file?param&amp;amp;autres#ancre
 */</span>
<span style="color: #000000; font-weight: bold;">function</span> is_url<span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #000088;">$motif_url</span><span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;^^(http|ftp|https)://([a-zA-Z0-9-]+.)?([a-zA-Z0-9-]+.)
               ?[a-zA-Z0-9-]+.[a-zA-Z]{2,4}(:[0-9]+)?(/[a-zA-Z0-9-]*)
               ?(.[a-zA-Z0-9]{1,4})?$&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">ereg</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$motif_url</span><span style="color: #339933;">,</span> <span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
      <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
   <span style="color: #b1b100;">else</span>
      <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * Génération d'un identifiant celui ci contient
 * des caractères alpha-numériques.
 * On lui passe en paramètre la taille que devra avoir l'identifiant
 */</span>
<span style="color: #000000; font-weight: bold;">function</span> generateHash<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$length</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
   <span style="color: #000088;">$hash</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #666666; font-style: italic;">// Caractères possibles</span>
   <span style="color: #000088;">$possible</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;0123456789abcdefghijklmnopqrstuvwxyz
                ABCDEFGHIJKLMNOPQRSTUVWXYZ&quot;</span><span style="color: #339933;">;</span> 
&nbsp;
   <span style="color: #666666; font-style: italic;">// Compteur pour la taille du hash</span>
   <span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> 
&nbsp;
   <span style="color: #666666; font-style: italic;">// ajoute un caractère aléatoirement au hash jusqu'à sa taille max</span>
   <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <span style="color: #000088;">$length</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #666666; font-style: italic;">// Trouve un caractère de façon aléatoire dans la liste</span>
      <span style="color: #666666; font-style: italic;">// des caractères possibles</span>
      <span style="color: #000088;">$char</span> <span style="color: #339933;">=</span> <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$possible</span><span style="color: #339933;">,</span> <span style="color: #990000;">mt_rand</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$possible</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #666666; font-style: italic;">// Ne pas reprendre ce caractère s'il est déjà dans le hash</span>
      <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #990000;">strstr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$hash</span><span style="color: #339933;">,</span> <span style="color: #000088;">$char</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
         <span style="color: #000088;">$hash</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$char</span><span style="color: #339933;">;</span>
	 <span style="color: #000088;">$i</span><span style="color: #339933;">++;</span>
      <span style="color: #009900;">&#125;</span>
   <span style="color: #009900;">&#125;</span>
&nbsp;
   <span style="color: #666666; font-style: italic;">// retour du résultat !</span>
   <span style="color: #b1b100;">return</span> <span style="color: #000088;">$hash</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * Vérification du hash
 * Doit contenir x caractères alpha numérique
 */</span>
<span style="color: #000000; font-weight: bold;">function</span> is_hash<span style="color: #009900;">&#40;</span><span style="color: #000088;">$hash</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #000088;">$motif_hash</span><span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;^([0-9A-Za-z]{&quot;</span> <span style="color: #339933;">.</span> HASHSIZE <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;})$&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">ereg</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$motif_hash</span><span style="color: #339933;">,</span> <span style="color: #000088;">$hash</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
      <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
   <span style="color: #b1b100;">else</span>
      <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * Fonction d'affichage
 */</span>
<span style="color: #000000; font-weight: bold;">function</span> affichage<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
   <span style="color: #666666; font-style: italic;">// Un id est passé en paramètre, on appel la fonction renvoyer</span>
   <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      renvoyer<span style="color: #009900;">&#40;</span><span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>
&nbsp;
   <span style="color: #666666; font-style: italic;">// Retour du formulaire on créé une url, appel</span>
   <span style="color: #666666; font-style: italic;">// de la fonction enregistrer</span>
   <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'creer'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
              <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'creer'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'oui'</span><span style="color: #009900;">&#41;</span>
              <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
              <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      enregistrer<span style="color: #009900;">&#40;</span><span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>
&nbsp;
   <span style="color: #666666; font-style: italic;">// Affichage du formulaire pour la création de l'url</span>
   <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">echo</span> <span style="color: #0000cc; font-style: italic;">&lt;&lt;&lt;HTML
&lt;form action=&quot;{$_SERVER['PHP_SELF']}&quot; method=&quot;POST&quot;&gt;
&lt;input type=&quot;hidden&quot; name=&quot;creer&quot; value=&quot;oui&quot; /&gt;
	  URL:
&lt;input type=&quot;text&quot; name=&quot;url&quot; value=&quot;http://&quot; /&gt;
&lt;input type=&quot;submit&quot; name=&quot;action&quot; value=&quot;R&amp;amp;eacute;duire&quot; /&gt;
	&lt;/form&gt;
&nbsp;
HTML</span><span style="color: #339933;">;</span>
  	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&lt;html&gt;
   &lt;head&gt;
      &lt;title&gt;TinyURL&lt;/title&gt;
   &lt;/head&gt;
   &lt;body&gt;
      <span style="color: #000000; font-weight: bold;">&lt;?php</span> affichage<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
   &lt;/body&gt;
&lt;/html&gt;</pre></td></tr></table></div>

<p>Le hash sert donc à récupérer l&#8217;URL dans la base. L&#8217;URL récupérée depuis la base de donnée modifie aussitôt la page visualisée par l&#8217;utilisation de la fonction header().<br />
 Pour parfaire la chose, il faudrait créer un fichier .htaccess renvoyant les URL du type http://domaine/%hash% vers http://domaine/dossier/url.php?id=%hash% &#8230;.</p>
<p>Voici un exemple d&#8217;un fichier .htaccess</p>

<div class="wp_codebox"><table><tr id="p1323"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code" id="p132code3"><pre class="ini" style="font-family:monospace;"># Tester si le module apache existe
&lt;IfModule mod_rewrite.c&gt;
&nbsp;
   # démarre la réécriture d'url
   RewriteEngine On
&nbsp;
   # Redirection http://mondomaine/tinyurl sur le script php
   # <span style="">&#40;</span>créé un petit lien<span style="">&#41;</span>
   RewriteRule tinyurl$ /url/url.php
&nbsp;
   # Redirection http://mondomaine/tinyurl/%hash% sur le script
   # avec le paramètre id
   RewriteRule tinyurl/<span style="">&#40;</span><span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>a-ZA-Z0-<span style="">9</span><span style="">&#93;</span>+<span style="">&#41;</span>$ /url/url.php?id<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">$1 <span style="">&#91;</span>L<span style="">&#93;</span></span></span>
&lt;/IfModule&gt;</pre></td></tr></table></div>

<p>Vous avez maintenant de quoi faire vos URL courtes sur votre site perso. Mon script est très légèrement différent et adapté pour être intégré dans <a href="http://wordpress.org/" target="_blank">Wordpress</a> vous pouvez le tester ici :</p>
<ul>
<li><a href="http://nfrey.com/LNS1e" target="_blank">http://nfrey.com/LNS1e</a></li>
</ul>
<p>Si vous avez des remarques ou questions, je reste joinable. Vous trouverez mes coordonnées sur la page &laquo;&nbsp;<a href="http://www.nfrey.com/a-propos/" target="_blank">à propos</a>&laquo;&nbsp;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nfrey.com/internet/tinyurl/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Protéger ses données avec TrueCrypt</title>
		<link>http://www.nfrey.com/divers/truecrypt/</link>
		<comments>http://www.nfrey.com/divers/truecrypt/#comments</comments>
		<pubDate>Wed, 20 Aug 2008 08:33:05 +0000</pubDate>
		<dc:creator>Nicolas Frey</dc:creator>
				<category><![CDATA[Divers]]></category>
		<category><![CDATA[cryptage]]></category>
		<category><![CDATA[données]]></category>
		<category><![CDATA[protection]]></category>
		<category><![CDATA[sécurité]]></category>

		<guid isPermaLink="false">http://www.nfrey.com/?p=83</guid>
		<description><![CDATA[Vous êtes parano, vous avez des données à protéger ou vous êtes un psychopathe de la sécurité. Il existe un logiciel fait pour vous. Il s'appelle TrueCrypt.]]></description>
			<content:encoded><![CDATA[<p>Vous êtes parano, vous avez des données à protéger ou vous êtes un psychopathe de la sécurité. Il existe un logiciel fait pour vous. Il s&#8217;appelle <a href="http://www.truecrypt.org/" target="_blank">TrueCrypt.</a></p>
<p><span id="more-83"></span></p>
<p><a href="http://www.truecrypt.org/" target="_blank">TrueCrypt</a> est un logiciel libre et gratuit de <a href="http://fr.wikipedia.org/wiki/M%C3%A9thode_de_chiffrement" target="_blank">chiffrement</a> à la volée. Il fonctionne sous <a href="http://www.microsoft.com/fr/fr/" target="_blank">Windows</a>, <a href="http://fr.wikipedia.org/wiki/Linux" target="_blank">Linux</a> et <a href="http://www.apple.com/fr/macosx/" target="_blank">Mac OS X</a>.</p>
<p>Il permet de créer un disque virtuel <a href="http://fr.wikipedia.org/wiki/M%C3%A9thode_de_chiffrement" target="_blank">crypté</a> contenu dans un fichier et de le monter comme un disque physique. <a href="http://www.truecrypt.org/" target="_blank">TrueCrypt</a> peut également <a href="http://fr.wikipedia.org/wiki/M%C3%A9thode_de_chiffrement" target="_blank">crypté</a> une partition entière ou un périphérique (Disque dur, disquette ou une clé USB). Le processus de <a href="http://fr.wikipedia.org/wiki/M%C3%A9thode_de_chiffrement" target="_blank">cryptage</a> est complètement transparent et en temps réel. Il faudra néanmoins en fonction du type de protection choisi un bon processeur capable de coder / décoder rapidement les informations.</p>
<p>Toutes les données stockées sur un disque <a href="http://www.truecrypt.org/" target="_blank">TrueCrypt</a> seront entièrement cryptées (noms des fichiers, répertoires &#8230;). Un volume <a href="http://www.truecrypt.org/" target="_blank">TrueCrypt</a> se comporte (une fois montés) comme un disques durs physiques. Il est ainsi possible, d&#8217;en réparer le système de fichiers, de le défragmenter, ou de le formater.</p>
<p>Les fonctions avancées donnent la possibilité de cacher un conteneur au sein d’un autre conteneur. Utile uniquement si quelqu&#8217;un veut vous faire révéler votre mot de passe par la force ou la torture. Il est également possible de chiffrer la partition système dans son intégralité, avec un décryptage avant le démarrage du système d’exploitation.</p>
<p><a href="http://www.truecrypt.org/" target="_blank">TrueCrypt</a> propose pour le chiffrement une sélection des meilleurs <a href="http://fr.wikipedia.org/wiki/Algorithmique" target="_blank">algorithmes</a> connus (<a href="http://fr.wikipedia.org/wiki/AES" target="_blank">AES</a>, <a href="http://fr.wikipedia.org/wiki/Serpent_(cryptographie)" target="_blank">Serpent</a>, <a href="http://fr.wikipedia.org/wiki/Twofish" target="_blank">Twofish</a>, et si vous êtes franchement parano, il est possible de les « cascader »), et comme fonctions de <a href="http://fr.wikipedia.org/wiki/Fonction_de_hachage" target="_blank">hachage cryptographiques</a> ( <a href="http://fr.wikipedia.org/wiki/RIPEMD-160" target="_blank">RIPEMD-160</a>, <a href="http://fr.wikipedia.org/wiki/SHA-512" target="_blank">SHA-512</a> ou <a href="http://fr.wikipedia.org/wiki/Whirlpool" target="_blank">Whirlpool</a>). Implémentés ici par des spécialistes en cryptographie, <a href="http://www.truecrypt.org/" target="_blank">TrueCrypt</a> se place bien devant certains logiciels commerciaux utilisant des algorithmes propriétaires.</p>
<h3>Liens</h3>
<p><a href="http://www.truecrypt.org/downloads.php" target="_blank">Télécharger TrueCrypt</a><br />
 <a href="http://www.truecrypt.org/localizations.php" target="_blank">Fichiers de Langue</a> <em>(pour le passer en français)</em></p>
<h3>Vidéos de démonstration</h3>
<p><a href="http://www.sebsauvage.net/temp/wink/tc_createvolume.html" target="_blank">Création d&#8217;un volume chiffré TrueCrypt sous Windows</a><br />
 <a href="http://www.sebsauvage.net/temp/wink/tc_mount.html" target="_blank">Utilisation d&#8217;un volume chiffré TrueCrypt sous Windows</a></p>
<p><br class="spacer_" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nfrey.com/divers/truecrypt/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Un IDE/EDI pour développer en PHP</title>
		<link>http://www.nfrey.com/developpement/eclipse-php/</link>
		<comments>http://www.nfrey.com/developpement/eclipse-php/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 15:19:10 +0000</pubDate>
		<dc:creator>Nicolas Frey</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[edi]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[utilisation]]></category>

		<guid isPermaLink="false">http://www.nfrey.com/?p=44</guid>
		<description><![CDATA[Un IDE, ou EDI en français, est un programme regroupant un éditeur de texte, compilateur, débogueur et plusieurs autres fonctionnalités comme de la coloration syntaxique, les gestions de versions, la comparaison de fichier, la recherche ou encore des outils pour faciliter la création de l'interface graphique.
Pour développer en PHP, il existe plusieurs solutions comme Notepad++, UltraEdit, Zend Studio ou encore Eclipse. ]]></description>
			<content:encoded><![CDATA[<p>Un IDE, ou EDI en français, est un programme regroupant un éditeur de texte, compilateur, débogueur et plusieurs autres fonctionnalités comme de la coloration syntaxique, les gestions de versions, la comparaison de fichier, la recherche ou encore des outils pour faciliter la création de l&#8217;interface graphique. <br />
 Pour développer en <a href="http://fr.wikipedia.org/wiki/Php" target="_blank">PHP</a>, il existe plusieurs solutions comme <a href="http://notepad-plus.sourceforge.net/" target="_blank">Notepad++</a>, <a href="http://www.ultraedit.com/" target="_blank">UltraEdit</a>, <a href="http://www.zend.com/fr/products/studio/" target="_blank">Zend Studio</a> ou encore <a href="http://www.eclipse.org/" target="_blank">Eclipse</a>.</p>
<p><span id="more-44"></span></p>
<p>Mon choix s&#8217;est orienté sur <a href="http://www.eclipse.org/" target="_blank">Eclipse</a> pour plusieurs raisons :</p>
<ul>
<li>C&#8217;est un logiciel libre et gratuit. </li>
<li>Il est extensible, universel et polyvalent. Vous pouvez l&#8217;utiliser aussi bien pour faire du <a href="http://fr.wikipedia.org/wiki/Java_(technologie)" target="_blank">java</a>, du <a href="http://fr.wikipedia.org/wiki/C_(langage)" target="_blank">C</a> ou du <a href="http://fr.wikipedia.org/wiki/Php" target="_blank">PHP</a>, ce qui permet donc de pouvoir développer avec plusieurs langages sans avoir à maitriser plusieurs outils.</li>
<li>Il est écrit en Java et il est compatible multi-plateforme. (Windows, Mac et Linux).</li>
<li>Il est très complet en fonctionnalités et si vous recherchez une fonction spécifique le système de plugins vous permettra certainement de l&#8217;ajouter.</li>
</ul>
<p><a href="http://notepad-plus.sourceforge.net/" target="_blank">Notepad++</a> et <a href="http://www.ultraedit.com/" target="_blank">UltraEdit</a> sont des éditeurs de texte. Certes se sont des éditeurs avancés qui proposent de la colorisation syntaxique ou des plugins assez sympa, mais pour faire du développement ils restent un peu limités. <a href="http://notepad-plus.sourceforge.net/" target="_blank">Notepad++</a> est néanmoins une très bonne alternative pour remplacer le bon vieux Notepad de <a href="http://www.microsoft.com/fr/fr/" target="_blank">Windows</a> qui ne propose aucune fonctionnalité.</p>
<h2>Installation d&#8217;Eclipse</h2>
<p>Le site d&#8217;Eclipse se trouve à l&#8217;adresse suivante <a href="http://www.eclipse.org/" target="_blank">http://www.eclipse.org</a>. Et la page       de téléchargement est <a href="http://download.eclipse.org/eclipse/downloads/" target="_blank">http://download.eclipse.org/eclipse/downloads/</a></p>
<p>Pour des problèmes de compatibilité du plugins php, je vous conseille de télécharger et installer la version 3.3 ou antérieur d&#8217;Eclipse. Courant septembre une nouvelle version du plugins devrait être disponible et fonctionnelle avec la version 3.4 d&#8217;Eclipse. <em>Wait and see &#8230;</em></p>
<p>Il est nécessaire d&#8217;installer un java JDK version au moins (5.x) que l&#8217;on peut trouver sur le site de sun: <a href="http://java.sun.com/javase/downloads/index.jsp" target="_blank">http://java.sun.com</a>.</p>
<p>Une fois les packages téléchargés vous n&#8217;avez plus qu&#8217;à décompresser l&#8217;archive d&#8217;Eclipse et à installer le JDK de sun. Faites vous un raccourci d&#8217;eclipse.exe sur votre bureau et exécutez le pour voir si tout fonctionne. Pensez à bien choisir votre dossier (workspace) de travail lors du lancement d&#8217;<a href="http://www.eclipse.org/" target="_blank">Eclipse</a>, celui ci vous permettra d&#8217;y placer vos projets<a href="http://www.eclipse.org/" target="_blank">.<br />
 </a></p>
<h2>Mise en place des plugins</h2>
<p>Une fois <a href="http://www.eclipse.org/" target="_blank">Eclipse</a> fonctionnel, il ne reste plus qu&#8217;à s&#8217;occuper des plugins. On aura principalement besoin des <a href="http://www.eclipse.org/pdt/" target="_blank">PDT</a> (<a href="http://www.eclipse.org/pdt/" target="_blank">PHP Development tools</a>) pour développer en PHP. Ce plugins a un certain nombre de pré-requis. Voici donc la liste des éléments à télécharger:</p>
<ul>
<li><a href="http://www.eclipse.org/pdt/" target="_blank">PDT</a> (<a href="http://download.eclipse.org/tools/pdt/downloads/" target="_blank">PHP Development tools</a>)</li>
<li><a href="http://www.eclipse.org/modeling/mdt/?project=xsd#xsd" target="_blank">XSD</a> (<a href="http://www.eclipse.org/modeling/mdt/downloads/?project=xsd" target="_blank">XML Schema Definition</a>)<a href="http://www.eclipse.org/gef/" target="_blank"></a></li>
<li><a href="http://www.eclipse.org/gef/" target="_blank">GEF</a> (<a href="http://www.eclipse.org/gef/downloads/" target="_blank">Graphical Editing Framework</a>)</li>
<li><a href="http://www.eclipse.org/datatools/" target="_blank">DTP</a> (<a href="http://www.eclipse.org/datatools/downloads.php" target="_blank">Data Tools Platform</a>)</li>
<li><a href="http://www.eclipse.org/webtools/" target="_blank">WTP</a> (<a href="http://download.eclipse.org/webtools/downloads/" target="_blank">Web Tools Platform</a>)</li>
</ul>
<p>Vous pouvez également télécharger le plugin <a href="http://www.xorax.info/blog/news/170-javascript-eclipse-editeur.html" target="_blank">JSEclipse</a> qui était développé par <a href="http://www.interaktonline.com/Products/Eclipse/JSEclipse/Overview/" target="_blank">macromedia</a>. Voici un lien sur mon serveur pour le télécharger: <a href="http://www.nfrey.com/wp-content/uploads/2008/08/jseclipse_plugin_040207.zip" target="_blank">JSEclipse040207</a>.</p>
<p>Une fois les plugins téléchargés, il ne reste plus qu&#8217;à les installer. Il y a deux techniques voir même trois avec la dernière version d&#8217;Eclipse (<em>celle qui ne fonctionne pas avec les PDT 1.0.x</em>). La première consiste à décompresser le contenu de l&#8217;archive du plugin dans le dossier d&#8217;installation d&#8217;Eclipse. La seconde technique est légèrement plus propre. Surtout en cas de désinstallation ou de mis à jour d&#8217;un plugin. Elle consiste à créer un répertoire <em>links </em>et un répertoire <em>myplugins</em> puis de décompresser dans le dossier <em>myplugins</em> l&#8217;archive de votre plugin. Il faudra ensuite créer dans le dossier <em>links </em>un fichier <em>nomduplugins.link</em> avec comme contenu le chemin complet du plugin décompressé dans le répertoire <em>myplugins</em> précédé de <em>path=</em>. Voici un exemple:</p>
<pre><strong><span style="color: #888888;">Contenu du dossier d'installation d'Eclipse</span></strong></pre>
<pre>Eclipse
 |  configuration
 |  features
 |  links
 |  myplugins
 |   |  dtp-sdk_1.5.2
 |   |   |   eclipse
 |   |   |    |  features
 |   |   |    |  plugins
 |   |   |    |  readme
 |   |  org.eclipse.php_feature-R20080603
 |   |   |   eclipse
 |   |  ....
 |  plugins
 |  readme

<strong><span style="color: #888888;">Contenu du dossier links</span></strong>

links
 | dtp.link
 | php.link
 | ...

<strong><span style="color: #888888;">Contenu du fichier php.link</span></strong>
path=E:/dev/Eclipse/myplugins/org.eclipse.php_feature-R20080603

<strong><span style="color: #888888;">Contenu du fichier dtp.link</span></strong>
path=E:/dev/Eclipse/myplugins/dtp-sdk_1.5.2
</pre>
<p>Une fois que tous les plugins sont décompressés et que leurs liens ont été ajoutés dans le dossier <em>links</em> vous pouvez relancer Eclipse. Si tout se passe bien vous devriez avoir une trace des plugins chargés dans Help-&gt;About Eclipse SDK puis en cliquant sur &laquo;&nbsp;Features Details&nbsp;&raquo;.</p>
<div id="attachment_62" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.nfrey.com/wp-content/uploads/2008/08/eclipse_about_features.jpg"><img class="size-medium wp-image-62" title="Eclipse about features" src="http://www.nfrey.com/wp-content/uploads/2008/08/eclipse_about_features-300x190.jpg" alt="Eclipse about features" width="300" height="190" /></a><p class="wp-caption-text">Eclipse about features</p></div>
<p>En cas de problème pour le chargement des plugins, vous pouvez regarder dans le fichier .log qui se trouve dans le dossier <em>.metadata</em> du répertoire workspace d&#8217;Eclipse (emplacement qui vous a été demandé au chargement d&#8217;Eclipse).</p>
<h2>Travailler avec Eclipse</h2>
<p>Une fois Eclipse et ses plugins fonctionnels, il ne reste plus qu&#8217;à savoir comment tout cela fonctionne.</p>
<p>La suite dans un prochain article&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nfrey.com/developpement/eclipse-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuration d&#8217;un environnement de développement (php/mysql)</title>
		<link>http://www.nfrey.com/internet/install_php_mysql/</link>
		<comments>http://www.nfrey.com/internet/install_php_mysql/#comments</comments>
		<pubDate>Mon, 21 Jul 2008 13:39:47 +0000</pubDate>
		<dc:creator>Nicolas Frey</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Serveur]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.nfrey.com/?p=17</guid>
		<description><![CDATA[Comment se configurer un espace de développement PHP/MySQL sous Windows pour travailler proprement et efficacement.]]></description>
			<content:encoded><![CDATA[<p>Développer un site web, beaucoup de monde peut le faire, mais développer proprement et efficacement ce n&#8217;est pas la même affaire.</p>
<p><span id="more-17"></span>Je vais vous expliquer comment vous configurer un environnement de développement <a href="http://www.php.net/" target="_blank">php</a> / <a href="http://www.mysql.fr/" target="_blank">MySQL</a> sous <a href="http://www.microsoft.fr" target="_blank">Windows</a>.</p>
<p>La première chose à faire, c&#8217;est l&#8217;installation des serveurs. Dans notre cas <a href="http://www.mysql.fr/" target="_blank">MySQL</a> et <a href="http://www.apachefrance.com/" target="_blank">Apache</a>. Sur un serveur de production, il faudrait installer séparément apache, php et mysql pour avoir une configuration optimale, mais comme on veut se faire un espace de développement, il existe des solutions comprenant l&#8217;ensemble des applications nécessaires (<a href="http://www.wampserver.com/" target="_blank">wamp</a>, <a href="http://www.easyphp.org/" target="_blank">easyphp</a>, <a href="http://www.apachefriends.org/fr/xampp.html" target="_blank">xampp</a>&#8230;).</p>
<p>Personnellement j&#8217;utilise wamp. Pourquoi:</p>
<ul>
<li>Son interface conviviale et sa simplicité d&#8217;utilisation (Accès rapide aux fichiers de conf, démarrage des services simplifiées &#8230;) </li>
<li>Des addons, qui permettent d&#8217;avoir plusieurs versions possibles et de pouvoir passer de l&#8217;une à l&#8217;autre facilement</li>
</ul>
<p>Quel est l&#8217;intérêt de configurer sur sa machine locale un serveur web et mettre en place un <a href="http://en.wikipedia.org/wiki/Virtual_hosting" target="_blank">virtualHost</a> ?</p>
<ul>
<li>Un dossier, une configuration, des fichiers logs différents pour chaque site.</li>
<li>Une racine et une configuration étant celle du serveur.</li>
<li>Une url (nom local) accessible rapidement pour chaque site développé. <em>ex: www.monsite.com et www.monsite.local</em></li>
<li>Un développement en local permet de ne pas casser son site visible depuis internet. On peut donc faire tout changement sans porter atteinte à la visibilité du site. </li>
<li>Permet aussi de configurer son serveur local pour avoir un meilleur débogage. </li>
</ul>
<p>Si vous êtes convaincu, <a href="http://www.wampserver.com/" target="_blank">Téléchargez wamp</a> et installez-le. Une fois l&#8217;installation effectuée, il faut configurer l&#8217;ensemble. Le but du jeu est d&#8217;avoir chaque site web dans un dossier avec une <a href="http://fr.wikipedia.org/wiki/Uniform_Resource_Locator" target="_blank">URL</a> locale (<a href="http://fr.wikipedia.org/wiki/Domain_Name_System" target="_blank">DNS</a>) lui étant associée. On va donc commencer par modifier le fichier hosts en associant une <a href="http://fr.wikipedia.org/wiki/Adresse_IP" target="_blank">IP</a> à un nom. Ceci permettra d&#8217;accéder à notre machine via un nom plutôt que par une IP, ce qui permettra ensuite de configurer le serveur web sur ce nom.</p>
<p><strong>C:\WINDOWS\system32\drivers\etc\hosts</strong></p>
<pre># fichier hosts</pre>
<pre>127.0.0.1       	localhost # ligne par défaut</pre>
<pre>127.0.0.1		monsite.local # ligne à ajouter.</pre>
<p>Une fois le fichier hosts modifié, on va changer la configuration d&#8217;apache, et ajouter un <a href="http://en.wikipedia.org/wiki/Virtual_hosting" target="_blank">virtualHost</a> sur le nom local de la machine. Un <a href="http://en.wikipedia.org/wiki/Virtual_hosting" target="_blank">virtualHost</a> est une zone qui est mappée sur un nom de domaine. On peut donc avoir sur la même machine avec une seule <a href="http://fr.wikipedia.org/wiki/Adresse_IP" target="_blank">IP</a> plusieurs site web avec chacun un domaine différent.</p>
<p><strong>%install_dir_wamp%/bin/apache/apacheX.X.XX/conf/httpd.conf</strong></p>
<pre>Include conf/httpd-vhosts.conf # A décommenter.</pre>
<p><strong><br />
 %install_dir_wamp%/bin/apache/apacheX.X.XX/conf/httpd-vhosts.conf</strong></p>
<pre>NameVirtualHost * # écoute sur toutes les ip et tous les ports

&lt;VirtualHost *:80&gt;
    ServerName localhost
    DocumentRoot E:/dev/wamp/www # dossier par défaut de wamp
    ErrorLog E:/dev/wamp/logs/error_log # fichier de log
    CustomLog E:/dev/wamp/logs/access_log common # fichier de log
&lt;/VirtualHost&gt;

&lt;VirtualHost *:80&gt;
    ServerName monsite.local # dns que l'on retrouve dans le hosts
    DocumentRoot F:/workspace/monsite # emplacement racine du site
    DirectoryIndex index.php # fichier par défaut
    ErrorLog F:/workspace/monsite/logs/error_log
    CustomLog F:/workspace/monsite/logs/access_log common
&lt;/VirtualHost&gt;
</pre>
<p>Une fois les modifications effectuées, il vous faudra redémarrer le serveur web. N&#8217;oubliez pas de créer tous les dossiers nécessaires (dont les dossiers logs qu&#8217;Apache ne créé pas tout seul) et de passer en ligne Wamp. Si tout se passe bien, le serveur devrait redémarrer correctement et vous dévriez avoir accès via votre navigateur à <a href="http://monsite.local" target="_blank">http://monsite.local</a>. Il ne vous restera plus qu&#8217;à télécharger un <a href="http://fr.wikipedia.org/wiki/Environnement_de_d%C3%A9veloppement_int%C3%A9gr%C3%A9" target="_blank">IDE</a> comme <a href="http://www.eclipse.org/" target="_blank">Eclipse</a>, <a href="http://www.zend.com/fr/products/studio/" target="_blank">Zend Studio</a> ou encore <a href="http://notepad-plus.sourceforge.net" target="_blank">Notepad++</a> pour développer vos sites, installer un système de contrôle de version (versioning) et configurer votre navigateur avec des outils pour simplifier le débogage.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nfrey.com/internet/install_php_mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Le web utile</title>
		<link>http://www.nfrey.com/divers/web-utile/</link>
		<comments>http://www.nfrey.com/divers/web-utile/#comments</comments>
		<pubDate>Fri, 04 Jul 2008 11:31:45 +0000</pubDate>
		<dc:creator>Nicolas Frey</dc:creator>
				<category><![CDATA[Divers]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[lien]]></category>
		<category><![CDATA[outils]]></category>
		<category><![CDATA[pratique]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[url]]></category>

		<guid isPermaLink="false">http://www.nfrey.com/?p=18</guid>
		<description><![CDATA[Internet est grand, internet est fort, mais il est certainement plus grand qu'il n'est fort, et ce, du fait que l'on a pas forcement les bonnes adresses.]]></description>
			<content:encoded><![CDATA[<p>Internet est grand, internet est fort, mais il est certainement plus grand qu&#8217;il n&#8217;est fort, et ce, du fait que l&#8217;on a pas forcement les bonnes adresses.</p>
<p><span id="more-18"></span>Il existe un grand nombre de moteurs de recherche, un grand nombre d&#8217;outils, d&#8217;applications ou de sites d&#8217;informations. Mais les connaissez vous ou les utilisez vous ?<br />
 Je vais dans cet article vous faire une liste des sites que j&#8217;aime utiliser, voir ou lire. J&#8217;espère vous les faire découvrir et vous les faire utiliser.</p>
<h2>Application en ligne</h2>
<h3><a href="http://www.google.com/calendar/" target="_blank">Google Calendar</a></h3>
<p><em>Google Calendar est un agenda en ligne, il est très pratique et très conviviale. Il permet d&#8217;ajouter, de modifier et de voir son planning sur une journée, une semaine ou sur un mois. On peut mettre des alertes SMS, Email ou popup sur chacun des événements créés en choisissant la fréquence des rappels. Vous pouvez partager des calendriers, et en récupérer des partagés. Vous pouvez aussi utiliser les calendriers dans une application lourde type <a href="http://www.mozilla-europe.org/fr/products/thunderbird/" target="_blank">Thunderbird</a> et <a href="http://extensions.geckozone.org/Lightning/" target="_blank">Lightning</a> ( <a href="https://addons.mozilla.org/fr/thunderbird/addon/4631" target="_blank">Fournisseur pour Google Agenda</a> )</em>.</p>
<h3><a href="http://docs.google.com/" target="_blank">Google Documents</a></h3>
<p><em>Google documents est l&#8217;<a href="http://fr.openoffice.org/" target="_blank">openOffice</a> ou <a href="http://office.microsoft.com/" target="_blank">Microsoft Office</a> du web, il permet de créer en ligne des documents texte (de type <a href="http://www.microsoft.com/" target="_blank">Word</a>), des feuilles de calculs (de type <a href="http://www.microsoft.com/" target="_blank">Excel</a>) ou des présentations (de type <a href="http://www.microsoft.com/" target="_blank">PowerPoint</a>). Les documents créés sont exportables en différents formats (OpenDocuments, Microsoft, PDF, HTML ou autres). Vous pouvez partager vos documents et travailler en collabaration. Si le même document est édité par plusieurs personnes vous avez en temps réél ces modifications ou tout autre changement. Depuis peu le support du PDF a été ajouté. Vous pouvez donc y stocker vos documents de type PDF pour les visualiser ou les partager</em></p>
<h3><a href="http://maps.google.com/" target="_blank">Google Maps</a></h3>
<p><em>Google Maps est un système de cartographie du monde entier, il se démarque néanmoins des autres par ses fonctionnalités supplémentaires comme le partage et personnalisation de cartes, la vue satellite très précise, le relief et le fabuleux Street View qui vous permet de vous promenez dans une ville avec une vue panoramique (Malheureusement il manque encore beaucoup de ville en France mais c&#8217;est en cours &#8230;).<br />
 Google Maps est aussi disponible sur les téléphones portables et permet un positionnement sur la carte via la triangulation du réseau GSM (Peu précis).<br />
 Vous pouvez aussi télécharger l&#8217;application <a href="http://earth.google.com/" target="_blank">GoogleEarth</a> qui permet une visualisation en 3D des bâtiments et du relief mais il ajoute aussi beaucoup de fonctionnalités.<br />
 </em></p>
<h3><a href="http://www.deezer.com/" target="_blank">Deezer</a></h3>
<p><em>La tendance actuelle va à ce que l&#8217;on se déplace de moins en moins en magasin pour acheter des CDs. On veut tout, partout et sans attendre. De plus, le droit à la copie privée ainsi que certaines protections sur les CDs, nous empêches de les avoir partout et de nous en faire des copies pour les écouter en voiture ou au boulot.<br />
 Deezer permet légalement d&#8217;écouter tous types de musiques en ligne. Vous avez accès à un moteur de recherche qui permet une recherche sur des albums, des artistes ou des titres. Vous pouvez vous faire des playlists, et aussi utiliser une smartRadio qui se chargera de vous faire écouter des musiques en fonction du style que vous avez choisi.</em></p>
<h3><a href="http://www.zamzar.com/" target="_blank">Zamzar</a></h3>
<p><em>Vous avez surement déjà eu des fichiers dans un certain format que vous vouliez convertir. Zamzar va pouvoir s&#8217;en occuper. C&#8217;est un outil de conversion, il prend donc un fichier d&#8217;un certain type en entrée pour le convertir dans un autre format. L&#8217;outil permet de convertir tout type de fichiers, des fichiers image (jpg, png, gif, tga &#8230;.), des documents (doc, docx, html, pdf, xls, ppt &#8230;), des musiques (mp3, ac3, mp4, wav, ra &#8230;), des vidéos (3gp, mov, avi, mpeg &#8230;) ou d&#8217;autres formats (7z, zip, tar, rar &#8230;.). Une fois la conversion effectuée vous recevez un mail avec un lien pour télécharger le fichier converti.</em></p>
<h2>Informations et outils</h2>
<h3><a href="http://www.phoenixjp.net/" target="_blank">PhoenixJP</a></h3>
<p><em><a href="http://www.phoenixjp.net/" target="_blank">PhoenixJP</a> est un site qui référence via des flux RSS toutes les actualités du web. Celles ci sont classées par catégories (Générale, Hardware, tuning, Jeux, Mobile, OS, Sécurité &#8230;.). On a donc accès rapidement à l&#8217;ensemble des actualités sur une seule page. On peut choisir une catégorie, filtrer par date et même créer sa propre page personnalisée.</em></p>
<h3><a href="http://dictionnaire.tv5.org/" target="_blank">Dictionnaire / MédiaDico<br />
</a></h3>
<p><em>Internet, MSN, Texto &#8230; ont tendance à nous faire oublier comment écrire correctement et sans faute d&#8217;orthographe. Je trouve ce <a href="http://dictionnaire.tv5.org/" target="_blank">dictionnaire</a> très bien fait et surtout ce n&#8217;est pas qu&#8217;un dictionnaire classique. On y retrouve des définitions, synonymes, conjugaisons, style et traduction anglais/français et français/anglais. <br />
 Il existe même une extension pour firefox et Internet Explorer, permettant d&#8217;accèder directement aux fonctions du dictionnaire.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nfrey.com/divers/web-utile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cryptage des conversations MSN</title>
		<link>http://www.nfrey.com/divers/cryptage_msn/</link>
		<comments>http://www.nfrey.com/divers/cryptage_msn/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 17:13:08 +0000</pubDate>
		<dc:creator>Nicolas Frey</dc:creator>
				<category><![CDATA[Divers]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[conversation]]></category>
		<category><![CDATA[cryptage]]></category>
		<category><![CDATA[live messenger]]></category>
		<category><![CDATA[msn]]></category>

		<guid isPermaLink="false">http://www.nfrey.com/?p=19</guid>
		<description><![CDATA[Vous discutez sur MSN ou avec un autre messagerie, vous avez peur que l'on récupère ou que l'on utilise vos conversations et données personnelles. Il existe des solutions pour sécuriser vos conversations.]]></description>
			<content:encoded><![CDATA[<p>Vous discutez sur MSN ou avec une autre messagerie, vous avez peur que l&#8217;on récupère ou que l&#8217;on utilise vos conversations et données personnelles. Il existe des solutions pour sécuriser vos conversations.</p>
<p><span id="more-19"></span>MSN ou tout autre logiciel pour converser en ligne utilisent des protocoles non crypté. Ce qu&#8217;il veut dire que n&#8217;importe qui sur le réseau pourrait récupérer vos conversations. Certe ce n&#8217;est pas donné à n&#8217;importe qui, mais une personne qui s&#8217;y connait un peu y arrivera facilement.</p>
<p>Il existe néammoins des parades, plus ou moins efficaces et plus ou moins faciles à installer.</p>
<ul>
<li><a href="http://www.angelfire.com/ns2/deathangelm666/" target="_blank">MSN Crypt</a></li>
<li><a href="http://www.branchez-vous.com/logiciel/03-08/07-274301.html" target="_blank">IMsecure</a></li>
<li><a href="http://www.secway.fr/fr/products/simplite_msn/" target="_blank">SimpLite</a></li>
</ul>
<p>Personnellement après avoir fait le tour de ces sites, je me suis tourné vers SimpLite. Les autres me semblaient un peu bizarre à l&#8217;utilisation.<br />
 SimpLite est un logiciel qui fonctionne en standalone, il est gratuit et permet une utilisation sous MSN, ICQ/AIM, Yahoo ou Jabber. Il existe une version pro qui ajoute quelques fonctionnalités supplémentaires et la possibilité d&#8217;être multi-protocole (Une application par protocole pour la version free).<br />
 Simplite est simple d&#8217;utilisation, il détecte automatiquement si votre interlocuteur a installé le logiciel et procède à un échange de clef suite à l&#8217;acceptation des deux tiers. Une fois que les clefs ont été échangées la conversation sera cryptée à chaque fois que vous discuterez avec cette même personne. A condition bien sur que simpLite soit exécuté. Si toutefois vous discutez avec quelqu&#8217;un qui n&#8217;a pas installé le logiciel, il vous informera que la conversation est standard et vous pourrez discuter normalement. SimpLite est donc simple d&#8217;utilisation et une fois que vous aurez accepté les clefs de tous vos contacts il sera complètement transparent.</p>
<p>Voila, vous savez tout pour protéger votre vie privée.</p>
<p>Mais si vous êtes un vrai parano vous pouvez aussi protéger vos historiques de conversations MSN. Il vous suffira d&#8217;installer MSN Plus. Mais pensez à désactiver les historiques de <a href="http://www.windowslive.fr/messenger/" target="_blank">LiveMessenger</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nfrey.com/divers/cryptage_msn/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.931 seconds -->
<!-- Cached page served by WP-Cache -->
