<?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>Hyperthèse &#187; Classes</title>
	<atom:link href="http://hyperthese.net/category/programmation/php/classes/feed/" rel="self" type="application/rss+xml" />
	<link>http://hyperthese.net</link>
	<description>La connaissance supposée fausse</description>
	<lastBuildDate>Mon, 14 Jun 2010 17:32:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PDO et online.net</title>
		<link>http://hyperthese.net/pdo-et-onlinenet/</link>
		<comments>http://hyperthese.net/pdo-et-onlinenet/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 23:35:23 +0000</pubDate>
		<dc:creator>Rémy Sanchez</dc:creator>
				<category><![CDATA[Classes]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://hyperthese.net/pdo-et-onlinenet/</guid>
		<description><![CDATA[MAJ: online.net gère maintenant PDO, mais je laisse l&#8217;article au cas où quelqu&#8217;un en ait quand même besoin&#8230;
Je me suis retrouvé à devoir écrire une application qui est hébergé sur online.net. Donc j&#8217;ai fait un tour sur leur site, j&#8217;ai vu PHP5, je me suis dit &#8220;oh cool ça veut dire que je peux faire [...]]]></description>
			<content:encoded><![CDATA[<p><strong>MAJ</strong>: online.net gère maintenant PDO, mais je laisse l&#8217;article au cas où quelqu&#8217;un en ait quand même besoin&#8230;</p>
<p>Je me suis retrouvé à devoir écrire une application qui est hébergé sur online.net. Donc j&#8217;ai fait un tour sur leur site, j&#8217;ai vu PHP5, je me suis dit &#8220;oh cool ça veut dire que je peux faire de la POO pour de vrai et utiliser les trucs modernes genre <a href="http://hyperthese.net/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ZyLnBocC5uZXQvZmlsdGVyX2lucHV0">filter_input()</a> et <a href="http://hyperthese.net/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ZyLnBocC5uZXQvcGRv">PDO</a>&#8220;.<br />
Et bah non ! Pour filter_input ça marche, en revanche pour ce qui est de PDO c&#8217;est pas installé&#8230; C&#8217;est rigolo de découvrir ce genre de gags le jour de la mise en ligne&#8230;<br />
Ayant clairement la flemme de tout migrer vers les vieilles fonctions mysql_* moisies et pourries, j&#8217;ai donc décidé de faire une <a href="http://hyperthese.net/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2h5cGVydGhlc2UubmV0L3NyYy9wZG8ucGhwLmJ6Mg==">implémentation de PDO méga à l&#8217;arrache</a> en PHP pur qui gère juste les fonctions que j&#8217;utilise (heureusement pour moi j&#8217;ai pas encore l&#8217;habitude de jouer avec toutes les propriétés de PDO). Je le met en ligne dans l&#8217;espoir que personne n&#8217;ai jamais à l&#8217;utiliser, mais j&#8217;ai peur du contraire&#8230;<br />
En gros question fonctionalités, j&#8217;ai implémenté vite fait tout ce qui est query/prepare/bindValue (mais attention, au moment de faire $sth->execute() ça ne vérifie pas que tous les paramètres ont été rentrés, et de plus je ne gère pas les paramètres en &#8220;?&#8221;, seulement ceux en &#8220;:nom&#8221;). Il n&#8217;y a aucune gestion des exceptions/erreurs. En dehors de ça, le comportement des fonctions est exactement le même que avec le vrai PDO, sauf que il va manquer certains arguments facultatifs de temps en temps. Ah oui, et puis ça ne gère que mysql.<br />
Bref, c&#8217;est du sur mesure pour mes besoins, il ne faut pas considérer ça comme un remplacement viable de PDO, mais comme une rustine qu&#8217;on peut adapter pour soi en cas d&#8217;extrême nécessité.</p>
 <img src="http://hyperthese.net/wp-content/plugins/feed-statistics.php?view=1&#038;post_id=126" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://hyperthese.net/pdo-et-onlinenet/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Gestion des chemins en PHP</title>
		<link>http://hyperthese.net/gestion-des-chemins-en-php/</link>
		<comments>http://hyperthese.net/gestion-des-chemins-en-php/#comments</comments>
		<pubDate>Wed, 12 Mar 2008 00:45:43 +0000</pubDate>
		<dc:creator>Rémy Sanchez</dc:creator>
				<category><![CDATA[Classes]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programmation]]></category>

		<guid isPermaLink="false">http://hyperthese.net/gestion-des-chemins-en-php/</guid>
		<description><![CDATA[Comme j'en avais marre de devoir constament verrifier si les chemins avec lesquels je travaillais finissaient oui ou non par "/", j'ai décidé de faire une classe pour gérer ça de la manière la plus simple possible. Vous pouvez télécharger cette classe aux formats 7zip, Bzip2 ou Zip.
Voici l'exemple d'utilisation que j'ai fait :
PLAIN TEXT
PHP:




&#60;?php


// [...]]]></description>
			<content:encoded><![CDATA[<p>Comme j'en avais marre de devoir constament verrifier si les chemins avec lesquels je travaillais finissaient oui ou non par "/", j'ai décidé de faire une classe pour gérer ça de la manière la plus simple possible. Vous pouvez télécharger cette classe aux formats <a href="http://hyperthese.net/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2h5cGVydGhlc2UubmV0L3NyYy9jbGFzcy5wYXRoLjd6">7zip</a>, <a href="http://hyperthese.net/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2h5cGVydGhlc2UubmV0L3NyYy9jbGFzcy5wYXRoLnRhci5iejI=">Bzip2</a> ou <a href="http://hyperthese.net/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2h5cGVydGhlc2UubmV0L3NyYy9jbGFzcy5wYXRoLnppcA==">Zip</a>.</p>
<p>Voici l'exemple d'utilisation que j'ai fait :</p>
<div class="igBar"><span id="lphp-2"><a href="http://hyperthese.net/wp-content/plugins/feed-statistics.php?url=Iw==" onclick=\"javascript:showCodeTxt('php-2'); return false;\">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-2">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// First of all, we need to include the class</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">require_once</span> <span style="color:#FF0000;">"class.path.php"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Then we'll create a new path, with all options</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// In order, the options are : the path string, is the path pointing a</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// directory, is there some string to put before the path, and what is the</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// separator ?</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$path</span> = <span style="color:#000000; font-weight:bold;">new</span> Path<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"/some/path/to/test/"</span>, <span style="color:#000000; font-weight:bold;">true</span>, <span style="color:#FF0000;">"http://"</span>, <span style="color:#FF0000;">"/"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Obviously, I want to output an URL, just look</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://hyperthese.net/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5waHAubmV0L2VjaG8="><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"It's looking like an URL: $path<span style="color:#000099; font-weight:bold;">\n</span>"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Now I create a new path with a completely different delimiter</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$path2</span> = <span style="color:#000000; font-weight:bold;">new</span> Path<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\a</span><span style="color:#000099; font-weight:bold;">\f</span>ile.php"</span>, <span style="color:#000000; font-weight:bold;">false</span>, <span style="color:#000000; font-weight:bold;">null</span>, <span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\\</span>"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// And I can just append it to the previous one</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$path</span>-&gt;<span style="color:#006600;">a</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$path2</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// We could have done $path-&gt;b($path2), but it would have returned a new object</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// with $path2 appened instead of changing $path</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// And turn this into a SMB share</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$path</span>-&gt;<span style="color:#006600;">setHead</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\\</span><span style="color:#000099; font-weight:bold;">\\</span>"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$path</span>-&gt;<span style="color:#006600;">setSeparator</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\\</span>"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://hyperthese.net/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5waHAubmV0L2VjaG8="><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"Now it's a SMB share: $path<span style="color:#000099; font-weight:bold;">\n</span>"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// You can also use new basename() and dirname()</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Note that dirname() returns a Path and not a string</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://hyperthese.net/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5waHAubmV0L2VjaG8="><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"The parent directory is: "</span> . <span style="color:#0000FF;">$path</span>-&gt;<span style="color:#006600;">dirname</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> . <span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\n</span>"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://hyperthese.net/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5waHAubmV0L2VjaG8="><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"The pointed file is: "</span> . <span style="color:#0000FF;">$path</span>-&gt;<span style="color:#006600;">basename</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> . <span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\n</span>"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://hyperthese.net/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5waHAubmV0L2VjaG8="><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"But without its extension it would be: "</span> . <span style="color:#0000FF;">$path</span>-&gt;<span style="color:#006600;">basename</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">".php"</span><span style="color:#006600; font-weight:bold;">&#41;</span> . <span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\n</span>"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
 <img src="http://hyperthese.net/wp-content/plugins/feed-statistics.php?view=1&post_id=102" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://hyperthese.net/gestion-des-chemins-en-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Number One</title>
		<link>http://hyperthese.net/number-one/</link>
		<comments>http://hyperthese.net/number-one/#comments</comments>
		<pubDate>Mon, 01 Oct 2007 13:08:43 +0000</pubDate>
		<dc:creator>Rémy Sanchez</dc:creator>
				<category><![CDATA[Classes]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programmation]]></category>

		<guid isPermaLink="false">http://hyperthese.net/number-one/</guid>
		<description><![CDATA[Youpi   J'ai gagné =D


&#160;

	    
	
&#160;


 ]]></description>
			<content:encoded><![CDATA[<p>Youpi <img src='http://hyperthese.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  J'ai gagné =D</p>
<table border="0">
<tr>
<td style="width: 50%;">&nbsp;</td>
<td>
	    <script src="http://www.phpclasses.org/browse/package/4046/format/badge.js"></script>
	</td>
<td style="width: 50%;">&nbsp;</td>
</tr>
</table>
 <img src="http://hyperthese.net/wp-content/plugins/feed-statistics.php?view=1&post_id=79" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://hyperthese.net/number-one/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>uncentralizedDownloader : nominé !</title>
		<link>http://hyperthese.net/uncentralizeddownloader-nomine/</link>
		<comments>http://hyperthese.net/uncentralizeddownloader-nomine/#comments</comments>
		<pubDate>Tue, 04 Sep 2007 21:00:35 +0000</pubDate>
		<dc:creator>Rémy Sanchez</dc:creator>
				<category><![CDATA[Classes]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://hyperthese.net/uncentralizeddownloader-nomine/</guid>
		<description><![CDATA[Et voilà, mon uncentralizedDownloader est nominé sur phpclasses pour le mois d'aout 2007 =)
--> La classe
 ]]></description>
			<content:encoded><![CDATA[<p>Et voilà, mon uncentralizedDownloader est nominé sur phpclasses pour le mois d'aout 2007 =)</p>
<p>--> <a href="http://hyperthese.net/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5waHBjbGFzc2VzLm9yZy9icm93c2UvcGFja2FnZS80MDQ2Lmh0bWw=">La classe</a></p>
 <img src="http://hyperthese.net/wp-content/plugins/feed-statistics.php?view=1&post_id=65" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://hyperthese.net/uncentralizeddownloader-nomine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Uncentralized Downloader</title>
		<link>http://hyperthese.net/uncentralized-downloader/</link>
		<comments>http://hyperthese.net/uncentralized-downloader/#comments</comments>
		<pubDate>Mon, 23 Jul 2007 17:52:37 +0000</pubDate>
		<dc:creator>Rémy Sanchez</dc:creator>
				<category><![CDATA[Classes]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://hyperthese.net/uncentralized-downloader/</guid>
		<description><![CDATA[Quand on a voulu faire des téléchargements directs sur TGS, nous avons été obligé d'utiliser free comme hébergeur, car je n'ai pas assez de bande passante ni de place sur mon serveur pour héberger de la musique. Mais on s'est heurté à divers obstacles :

Free est plutôt limité dans la liberté de configuration du serveur [...]]]></description>
			<content:encoded><![CDATA[<p>Quand on a voulu faire des téléchargements directs sur <a href="http://hyperthese.net/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy50aGVncmVhdHNwaXJpdC5uZXQv">TGS</a>, nous avons été obligé d'utiliser <a href="http://hyperthese.net/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5mcmVlLmZyLw==">free</a> comme hébergeur, car je n'ai pas assez de bande passante ni de place sur mon serveur pour héberger de la musique. Mais on s'est heurté à divers obstacles :</p>
<ul>
<li>Free est plutôt limité dans la liberté de configuration du serveur et les possibilités de PHP</li>
<li>Des serveurs se retrouvent hors ligne on ne sait pas bien pourquoi</li>
<li>Des sites hotlinkent nos fichiers (ils font des liens vers nos fichiers en faisant comme si ils venaient de leur site)</li>
</ul>
<p>La solution pour le 2eme problème était de faire une gestion décentralisée des téléchargements : au lieu qu'un fichier ne soit que sur un seul serveur, on le met sur plusieurs serveurs, comme ça si un des serveurs plante les autres serveurs peuvent continuer à proposer le fichier. Le rôle de UD est de scanner les différents serveurs pour trouver le fichier quelquepart et générer un lien de téléchargement valide.<br />
Pour le 3eme problème, la solution aurait facile si je n'avait pas eu le 1er problème. Malheureusement je l'avait... J'ai commencé par essayer de détourner les erreurs 404, mais pour diverses raisons ça n'était pas très stable et puis la plupart des firewalls empêchaient le système de fonctionner comme il faut. La parade a été de faire en sorte que le nom du dossier qui contient les fichiers change assez fréquement, de manière à ce que faire un lien permanant soit impossible. On envoi donc l'utilisateur sur une page qui verrifie que l'utilisateur vient du bon site, puis qui scanne tout les serveurs pour trouver les fichiers et ensuite créé un lien pour télécharger sur un des serveurs.<br />
Ça n'est évidament pas une protection ultime, puisque même un codeur moyen pourra facilement faire  sauter ce genre de protection, cependant ça reste une bonne arme contre la majorité des hotlinks : les blogs et tout les sites qui ne demandent aucune connaissance technique, car leurs webmasters n'ont justement aucune connaissance technique...</p>
<p>Comme mon blog est là pour faire profiter à ceux qui le veulent de mon code, voici les sources de ce gestionnaire de téléchargements, que j'espère suffisament documenté (en anglais). En cas de questions, n'hésitez pas à m'envoyer un mail <img src='http://hyperthese.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>
<p>--> Télécharger uncentralizedDownloader : <a href="http://hyperthese.net/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2h5cGVydGhlc2UubmV0L3NyYy91bmNlbnRyYWxpemVkRG93bmxvYWRlci43eg==">7zip</a> - <a href="http://hyperthese.net/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2h5cGVydGhlc2UubmV0L3NyYy91bmNlbnRyYWxpemVkRG93bmxvYWRlci50YXIuYnoy">Bzip2</a> - <a href="http://hyperthese.net/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2h5cGVydGhlc2UubmV0L3NyYy91bmNlbnRyYWxpemVkRG93bmxvYWRlci56aXA=">Zip</a></p>
<p>--> <a href="http://hyperthese.net/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5waHBjbGFzc2VzLm9yZy9icm93c2UvcGFja2FnZS80MDQ2Lmh0bWw=">La classe sur PHP Classes</a></p>
 <img src="http://hyperthese.net/wp-content/plugins/feed-statistics.php?view=1&post_id=52" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://hyperthese.net/uncentralized-downloader/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nouvelle version de phpSerial</title>
		<link>http://hyperthese.net/nouvelle-version-de-phpserial/</link>
		<comments>http://hyperthese.net/nouvelle-version-de-phpserial/#comments</comments>
		<pubDate>Fri, 01 Jun 2007 22:09:07 +0000</pubDate>
		<dc:creator>Rémy Sanchez</dc:creator>
				<category><![CDATA[Classes]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://remy.is-a-geek.org/nouvelle-version-de-phpserial/</guid>
		<description><![CDATA[Vous pourrez trouver la nouvelle version de phpSerial, ma classe pour lire/écrire sur le port série depuis linux ou windows (sauf que windows gère pas la lecture) en PHP sur le site PHP Classes.
 ]]></description>
			<content:encoded><![CDATA[<p>Vous pourrez trouver la nouvelle version de phpSerial, ma classe pour lire/écrire sur le port série depuis linux ou windows (sauf que windows gère pas la lecture) en PHP sur le site <a href="http://hyperthese.net/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5waHBjbGFzc2VzLm9yZy9icm93c2UvcGFja2FnZS8zNjc5Lmh0bWw=">PHP Classes</a>.</p>
 <img src="http://hyperthese.net/wp-content/plugins/feed-statistics.php?view=1&post_id=31" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://hyperthese.net/nouvelle-version-de-phpserial/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Classe Ping</title>
		<link>http://hyperthese.net/classe-ping/</link>
		<comments>http://hyperthese.net/classe-ping/#comments</comments>
		<pubDate>Tue, 09 Jan 2007 23:07:01 +0000</pubDate>
		<dc:creator>Rémy Sanchez</dc:creator>
				<category><![CDATA[Classes]]></category>

		<guid isPermaLink="false">http://remy.is-a-geek.org/classe-ping/</guid>
		<description><![CDATA[Voici une classe PHP capable d'effectuer un ping sous Windows et sous Linux. Requiert Pear (n'importe quelle version devrait faire l'affaire). (attention: je n'ai pas testé cette classe très largement, il se peut qu'il faille l'adapter à votre système)
Télécharger la classe
 ]]></description>
			<content:encoded><![CDATA[<p>Voici une classe PHP capable d'effectuer un ping sous Windows et sous Linux. Requiert Pear (n'importe quelle version devrait faire l'affaire). (attention: je n'ai pas testé cette classe très largement, il se peut qu'il faille l'adapter à votre système)</p>
<p><a href="http://hyperthese.net/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2h5cGVydGhlc2UubmV0L3NyYy9jbGFzcy5waW5nLnBocC50YXIuYnoy">Télécharger la classe</a></p>
 <img src="http://hyperthese.net/wp-content/plugins/feed-statistics.php?view=1&post_id=14" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://hyperthese.net/classe-ping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Afficheur de caisse Citizen C2202</title>
		<link>http://hyperthese.net/afficheur-de-caisse-citizen-c2202/</link>
		<comments>http://hyperthese.net/afficheur-de-caisse-citizen-c2202/#comments</comments>
		<pubDate>Tue, 09 Jan 2007 21:53:38 +0000</pubDate>
		<dc:creator>Rémy Sanchez</dc:creator>
				<category><![CDATA[Classes]]></category>

		<guid isPermaLink="false">http://remy.is-a-geek.org/afficheur-de-caisse-citizen-c2202/</guid>
		<description><![CDATA[J'ai récupéré un afficheur de caisse Citizen C2202, que j'ai programmé pour pouvoir afficher une fortune, lire mes mails et pinger mes serveur. En gros ça sert à rien, mais en tout cas c'était marrant à programmer ^^. Voici donc le code écrit à l'occasion (vous pourrez constater une classe de contrôle du port série), [...]]]></description>
			<content:encoded><![CDATA[<p>J'ai récupéré un afficheur de caisse Citizen C2202, que j'ai programmé pour pouvoir afficher une fortune, lire mes mails et pinger mes serveur. En gros ça sert à rien, mais en tout cas c'était marrant à programmer ^^. Voici donc le code écrit à l'occasion (vous pourrez constater une classe de contrôle du port série), qui ne fonctionne que sous linux (ou peut être certains unix, mais j'ai pas testé).
<p><a href="http://hyperthese.net/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2h5cGVydGhlc2UubmV0L3NyYy9jMjIwMnBkX2NvbnRyb2wudGFyLmJ6Mg==">Télécharger les fichiers</a></p>
<p>Vous remarquerez que la classe de contrôle de l'afficheur hérite de la classe de contrôle du port série, donc ne comptez pas utiliser l'une sans l'autre. Toutes les fonctions de l'afficheur ne sont pas implémentées (pour la simple raison que j'ai rien compris à certaines), et je ne converti pas non plus le charset vers quelquechose que l'afficheur pourrait comprendre (trop la flemme pour ça).</p>
<p>Et voici la documentation que le constructeur m'a fourni : <a id=\"p12\" href="http://hyperthese.net/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2h5cGVydGhlc2UubmV0L3dwLWNvbnRlbnQvdXBsb2Fkcy8yMDA3LzAxL2MyMjAyLXBkdW1lLnBkZg==">Citizen C2202-PDUME</a></p>
 <img src="http://hyperthese.net/wp-content/plugins/feed-statistics.php?view=1&post_id=13" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://hyperthese.net/afficheur-de-caisse-citizen-c2202/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
