<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Commentaires sur : Extraire le contenu d&#039;un zip directement sur son FTP chez free</title>
	<atom:link href="http://naeh.net/extraire-le-contenu-dun-zip-directement-sur-son-ftp-chez-free/feed/" rel="self" type="application/rss+xml" />
	<link>http://naeh.net/extraire-le-contenu-dun-zip-directement-sur-son-ftp-chez-free/</link>
	<description>Le mémo du développeur</description>
	<lastBuildDate>Wed, 25 Jan 2012 23:12:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>Par : Anthony</title>
		<link>http://naeh.net/extraire-le-contenu-dun-zip-directement-sur-son-ftp-chez-free/#comment-302</link>
		<dc:creator>Anthony</dc:creator>
		<pubDate>Wed, 15 Dec 2010 10:23:31 +0000</pubDate>
		<guid isPermaLink="false">http://naeh.net/extraire-le-contenu-dun-zip-directement-sur-son-ftp-chez-free/#comment-302</guid>
		<description>Bonjour,
Merci pour ce script très util
une proposition d&#039;amélioration du script, que j&#039;ai implémenté, en passant en paramètre du script le nom du fichier et le &quot;path&quot; :
il faut modifier comme le dit Marty plus haut :
&quot; modifier la fontion
&lt;pre lang=&quot;php&quot;&gt;function extract()&lt;/pre&gt;
en
&lt;pre lang=&quot;php&quot;&gt;function extract($p_path= &quot;./ &quot;, $p_remove_path=&quot;&quot;)&lt;/pre&gt;
dans pclzip.lib.php &quot;

puis le code de extract.php :
&lt;pre lang=&quot;php&quot;&gt;if ($archive-&gt;extract(&quot;./&quot;,&quot;&quot;) == 0) {
          die(&quot;Error : &quot;.$archive-&gt;errorInfo(true));
    } else {
        echo &quot;d&#233;compresion OK de $fichier dans ./ &quot;;
    }
  } else {
    $path = $_GET[&#039;path&#039;];
    if ($archive-&gt;extract(&quot;$path&quot;,&quot;&quot;) == 0) {
          die(&quot;Error : &quot;.$archive-&gt;errorInfo(true));
    } else {
        echo &quot;d&#233;compresion OK de $fichier dans $path &quot;;
    }
  }
  
} else {
  echo &quot;&quot;;
  echo &quot;&lt;b&gt; Outil permet de dezipper (utilise pclzip) &lt;/b&gt;&quot;;
  echo &quot; param&#232;tres a envoyer : &quot;;
  echo &quot;&lt;b&gt; extract.php?fichier=NOMFICHIERZIP&amp;path=PATH &lt;/b&gt;&quot;;
  echo &quot;( path non obligatoire vaut par d&#233;faut \&quot;./\&quot; )&quot;;
  echo &quot;&quot;;
}
?&gt;
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Bonjour,<br />
Merci pour ce script très util<br />
une proposition d&#8217;amélioration du script, que j&#8217;ai implémenté, en passant en paramètre du script le nom du fichier et le &laquo;&nbsp;path&nbsp;&raquo; :<br />
il faut modifier comme le dit Marty plus haut :<br />
&nbsp;&raquo; modifier la fontion</p>

<div class="wp_codebox"><table><tr id="p501"><td class="code" id="p50code1"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> <a href="http://www.php.net/extract"><span style="color: #990000;">extract</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span></pre></td></tr></table></div>

<p>en</p>

<div class="wp_codebox"><table><tr id="p502"><td class="code" id="p50code2"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> <a href="http://www.php.net/extract"><span style="color: #990000;">extract</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$p_path</span><span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;./ &quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$p_remove_path</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span></pre></td></tr></table></div>

<p>dans pclzip.lib.php &nbsp;&raquo;</p>
<p>puis le code de extract.php :</p>

<div class="wp_codebox"><table><tr id="p503"><td class="code" id="p50code3"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$archive</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">extract</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;./&quot;</span><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: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
          <a href="http://www.php.net/die"><span style="color: #990000;">die</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Error : &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$archive</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">errorInfo</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;d&amp;eacute;compresion OK de <span style="color: #006699; font-weight: bold;">$fichier</span> dans ./ &quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$path</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'path'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$archive</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">extract</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$path</span>&quot;</span><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: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
          <a href="http://www.php.net/die"><span style="color: #990000;">die</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Error : &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$archive</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">errorInfo</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;d&amp;eacute;compresion OK de <span style="color: #006699; font-weight: bold;">$fichier</span> dans <span style="color: #006699; font-weight: bold;">$path</span> &quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;b&gt; Outil permet de dezipper (utilise pclzip) &lt;/b&gt;&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot; param&amp;egrave;tres a envoyer : &quot;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;b&gt; extract.php?fichier=NOMFICHIERZIP&amp;amp;path=PATH &lt;/b&gt;&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;( path non obligatoire vaut par d&amp;eacute;faut <span style="color: #000099; font-weight: bold;">\&quot;</span>./<span style="color: #000099; font-weight: bold;">\&quot;</span> )&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

]]></content:encoded>
	</item>
	<item>
		<title>Par : Naeh</title>
		<link>http://naeh.net/extraire-le-contenu-dun-zip-directement-sur-son-ftp-chez-free/#comment-34</link>
		<dc:creator>Naeh</dc:creator>
		<pubDate>Sat, 10 Jul 2010 09:19:24 +0000</pubDate>
		<guid isPermaLink="false">http://naeh.net/extraire-le-contenu-dun-zip-directement-sur-son-ftp-chez-free/#comment-34</guid>
		<description>Bonjour,

si tu mets du code php dans ton commentaire, il faut l&#039;entourer de :
&lt;code&gt;&lt; pre lang=&quot;php&quot; &gt;CODE PHP &lt; /pre &gt;&lt;/code&gt;

remplacer CODE PHP par le code en question :)

sans les espaces dans la balise pre

Bon courage.</description>
		<content:encoded><![CDATA[<p>Bonjour,</p>
<p>si tu mets du code php dans ton commentaire, il faut l&#8217;entourer de :<br />
<code>< pre lang="php" >CODE PHP < /pre ></code></p>
<p>remplacer CODE PHP par le code en question <img src='http://naeh.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>sans les espaces dans la balise pre</p>
<p>Bon courage.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Par : kawa</title>
		<link>http://naeh.net/extraire-le-contenu-dun-zip-directement-sur-son-ftp-chez-free/#comment-33</link>
		<dc:creator>kawa</dc:creator>
		<pubDate>Fri, 09 Jul 2010 11:58:05 +0000</pubDate>
		<guid isPermaLink="false">http://naeh.net/extraire-le-contenu-dun-zip-directement-sur-son-ftp-chez-free/#comment-33</guid>
		<description>attention, le code complet de la page que j&#039;ai donné précédemment semble avoir été mangé par l&#039;interface du forum !! glups !!</description>
		<content:encoded><![CDATA[<p>attention, le code complet de la page que j&#8217;ai donné précédemment semble avoir été mangé par l&#8217;interface du forum !! glups !!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Par : kawa</title>
		<link>http://naeh.net/extraire-le-contenu-dun-zip-directement-sur-son-ftp-chez-free/#comment-32</link>
		<dc:creator>kawa</dc:creator>
		<pubDate>Fri, 09 Jul 2010 11:56:41 +0000</pubDate>
		<guid isPermaLink="false">http://naeh.net/extraire-le-contenu-dun-zip-directement-sur-son-ftp-chez-free/#comment-32</guid>
		<description>Donc pour nous résumer, voici un exemple de la page extract.php complète (créée avec Dreamweaver) :





Document sans nom



hello
extract() == 0) {
die(&#039;Error : &#039; .$archive-&gt;errorInfo(true));
}
?&gt;
world</description>
		<content:encoded><![CDATA[<p>Donc pour nous résumer, voici un exemple de la page extract.php complète (créée avec Dreamweaver) :</p>
<p>Document sans nom</p>
<p>hello<br />
extract() == 0) {<br />
die(&#8216;Error : &#8216; .$archive-&gt;errorInfo(true));<br />
}<br />
?&gt;<br />
world</p>
]]></content:encoded>
	</item>
	<item>
		<title>Par : aziatedu13</title>
		<link>http://naeh.net/extraire-le-contenu-dun-zip-directement-sur-son-ftp-chez-free/#comment-30</link>
		<dc:creator>aziatedu13</dc:creator>
		<pubDate>Sat, 17 Apr 2010 17:10:20 +0000</pubDate>
		<guid isPermaLink="false">http://naeh.net/extraire-le-contenu-dun-zip-directement-sur-son-ftp-chez-free/#comment-30</guid>
		<description>Ok, j&#039;ai trouvé l&#039;erreur, il faut supprimer l&#039;espace entre  &lt;?php le tout collé.

Mais j&#039;ai cet erreur qui apparait dans mon navigateur :

Parse error: syntax error, unexpected T_STRING in monsite/site/extract.php  on line 7

Pouvais vous m&#039;aider ??
merci.</description>
		<content:encoded><![CDATA[<p>Ok, j&#8217;ai trouvé l&#8217;erreur, il faut supprimer l&#8217;espace entre  &lt;?php le tout collé.</p>
<p>Mais j&#039;ai cet erreur qui apparait dans mon navigateur :</p>
<p>Parse error: syntax error, unexpected T_STRING in monsite/site/extract.php  on line 7</p>
<p>Pouvais vous m&#039;aider ??<br />
merci.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Par : aziatedu13</title>
		<link>http://naeh.net/extraire-le-contenu-dun-zip-directement-sur-son-ftp-chez-free/#comment-29</link>
		<dc:creator>aziatedu13</dc:creator>
		<pubDate>Sat, 17 Apr 2010 17:03:00 +0000</pubDate>
		<guid isPermaLink="false">http://naeh.net/extraire-le-contenu-dun-zip-directement-sur-son-ftp-chez-free/#comment-29</guid>
		<description>Bonjour,

Mon fichier extract.php est comme ceci

extract() == 0) {
die(« Error : « .$archive-&gt;errorInfo(true));
}
?&gt;

j&#039;ai bien telecharger sur mon serveur free :
- la libraire pclzip.lib.php
- mon fichier test.zip ( qu est monsite compressé avec izarc )
- et donc le fihcier extract.php

le tout mis dans un dossier &#039;site&#039; sur mon hebergeur free.
lorsque ej rentre, avec mozilla sur mon site : http://monsite.free.fr/site
je vois bien les 3 fichiers
je clic sur extract.php, et la je vois son contenu.
et rien ne se passe, aucune décompression...

Pouvais vous m&#039;aider ???
Merci.</description>
		<content:encoded><![CDATA[<p>Bonjour,</p>
<p>Mon fichier extract.php est comme ceci</p>
<p>extract() == 0) {<br />
die(« Error : « .$archive-&gt;errorInfo(true));<br />
}<br />
?&gt;</p>
<p>j&#8217;ai bien telecharger sur mon serveur free :<br />
- la libraire pclzip.lib.php<br />
- mon fichier test.zip ( qu est monsite compressé avec izarc )<br />
- et donc le fihcier extract.php</p>
<p>le tout mis dans un dossier &#8216;site&#8217; sur mon hebergeur free.<br />
lorsque ej rentre, avec mozilla sur mon site : <a href="http://monsite.free.fr/site" rel="nofollow">http://monsite.free.fr/site</a><br />
je vois bien les 3 fichiers<br />
je clic sur extract.php, et la je vois son contenu.<br />
et rien ne se passe, aucune décompression&#8230;</p>
<p>Pouvais vous m&#8217;aider ???<br />
Merci.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Par : Naeh</title>
		<link>http://naeh.net/extraire-le-contenu-dun-zip-directement-sur-son-ftp-chez-free/#comment-31</link>
		<dc:creator>Naeh</dc:creator>
		<pubDate>Sat, 17 Apr 2010 16:24:25 +0000</pubDate>
		<guid isPermaLink="false">http://naeh.net/extraire-le-contenu-dun-zip-directement-sur-son-ftp-chez-free/#comment-31</guid>
		<description>les « posent probleme, il faut remplacer par &quot; (une double côte =&gt; touche 3 et # du clavier) ou &#039; (simple côte =&gt; touche 4 du clavier).

il faut mettre :
&lt;pre lang=&quot;php&quot;&gt;
die(&quot;Error : &quot; .$archive-&gt;errorInfo(true));
&lt;/pre&gt;
ou :
&lt;pre lang=&quot;php&quot;&gt;
die(&#039;Error : &#039; .$archive-&gt;errorInfo(true));
&lt;/pre&gt;

c&#039;est la même chose.</description>
		<content:encoded><![CDATA[<p>les « posent probleme, il faut remplacer par &nbsp;&raquo; (une double côte => touche 3 et # du clavier) ou &#8216; (simple côte => touche 4 du clavier).</p>
<p>il faut mettre :</p>

<div class="wp_codebox"><table><tr id="p504"><td class="code" id="p50code4"><pre class="php" style="font-family:monospace;"><a href="http://www.php.net/die"><span style="color: #990000;">die</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Error : &quot;</span> <span style="color: #339933;">.</span><span style="color: #000088;">$archive</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">errorInfo</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>ou :</p>

<div class="wp_codebox"><table><tr id="p505"><td class="code" id="p50code5"><pre class="php" style="font-family:monospace;"><a href="http://www.php.net/die"><span style="color: #990000;">die</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Error : '</span> <span style="color: #339933;">.</span><span style="color: #000088;">$archive</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">errorInfo</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>c&#8217;est la même chose.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Par : Guillaume</title>
		<link>http://naeh.net/extraire-le-contenu-dun-zip-directement-sur-son-ftp-chez-free/#comment-28</link>
		<dc:creator>Guillaume</dc:creator>
		<pubDate>Sun, 20 Sep 2009 16:39:01 +0000</pubDate>
		<guid isPermaLink="false">http://naeh.net/extraire-le-contenu-dun-zip-directement-sur-son-ftp-chez-free/#comment-28</guid>
		<description>Pour les gens qui ne sont pas habitué avec le php, il faut rajouter les balises spécifiques au début et à la fin du code :

&lt;?php
//Extrait de la documentation de la class.
require_once(&#039;pclzip.lib.php&#039;);
$archive = new PclZip(&#039;test.zip&#039;); //METTRE LE VRAI NOM DU ZIP ;)
//Extrait dans le repertoire courant.
if ($archive-&gt;extract() == 0) {
      die(&quot;Error : &quot;.$archive-&gt;errorInfo(true));
}
?&gt;

PS merci à la modération d&#039;effacer les messages 20 à 22</description>
		<content:encoded><![CDATA[<p>Pour les gens qui ne sont pas habitué avec le php, il faut rajouter les balises spécifiques au début et à la fin du code :</p>
<p>< ?php<br />
//Extrait de la documentation de la class.<br />
require_once('pclzip.lib.php');<br />
$archive = new PclZip('test.zip'); //METTRE LE VRAI NOM DU ZIP <img src='http://naeh.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
//Extrait dans le repertoire courant.<br />
if ($archive->extract() == 0) {<br />
      die(&laquo;&nbsp;Error : &laquo;&nbsp;.$archive->errorInfo(true));<br />
}<br />
?></p>
<p>PS merci à la modération d&#8217;effacer les messages 20 à 22</p>
]]></content:encoded>
	</item>
	<item>
		<title>Par : Damien</title>
		<link>http://naeh.net/extraire-le-contenu-dun-zip-directement-sur-son-ftp-chez-free/#comment-27</link>
		<dc:creator>Damien</dc:creator>
		<pubDate>Wed, 03 Jun 2009 20:48:09 +0000</pubDate>
		<guid isPermaLink="false">http://naeh.net/extraire-le-contenu-dun-zip-directement-sur-son-ftp-chez-free/#comment-27</guid>
		<description>Super ça fonctionne nikel !

ps: il ne faut pas oublier les</description>
		<content:encoded><![CDATA[<p>Super ça fonctionne nikel !</p>
<p>ps: il ne faut pas oublier les</p>
]]></content:encoded>
	</item>
	<item>
		<title>Par : Naeh</title>
		<link>http://naeh.net/extraire-le-contenu-dun-zip-directement-sur-son-ftp-chez-free/#comment-26</link>
		<dc:creator>Naeh</dc:creator>
		<pubDate>Sat, 18 Apr 2009 19:23:07 +0000</pubDate>
		<guid isPermaLink="false">http://naeh.net/extraire-le-contenu-dun-zip-directement-sur-son-ftp-chez-free/#comment-26</guid>
		<description>@renaud :
le code que je donne plus haut est a mettre dans un fichier php donc un fichier qui commence par
&lt;pre lang=&quot;php&quot;&gt;
&lt;?php

&lt;/pre&gt;

je pense que c&#039;est ça qui vous manque ou bien un commentaire pas fermé, sinon on verrait pas le code source php dans le message d&#039;erreur.

cf commentaire #8</description>
		<content:encoded><![CDATA[<p>@renaud :<br />
le code que je donne plus haut est a mettre dans un fichier php donc un fichier qui commence par</p>

<div class="wp_codebox"><table><tr id="p506"><td class="code" id="p50code6"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span></pre></td></tr></table></div>

<p>je pense que c&#8217;est ça qui vous manque ou bien un commentaire pas fermé, sinon on verrait pas le code source php dans le message d&#8217;erreur.</p>
<p>cf commentaire #8</p>
]]></content:encoded>
	</item>
</channel>
</rss>

