<div dir="ltr">Thanks for replying Jamie.<div><br></div><div>I tried to use $archiver = archiver_get_archiver($file);</div><div><br></div><div>It shows <em class="">Exception</em>: Archivers can only operate on 
local files: &lt;em 
class=&quot;placeholder&quot;&gt;<a href="http://samplesite.com/sites/samplesite.com/files/testjan.zip">http://samplesite.com/sites/samplesite.com/files/testjan.zip</a>&lt;/em&gt;
 not supported in <em class="">archiver_get_archiver()</em> (line <em class="">8091</em> of <em class="">/sites/drupal7/includes/common.inc</em>).</div><div>Error to me.</div><div><br></div><div>Any solution on this?</div>
<div><br></div><div>do u have sample code for this?<br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jan 27, 2014 at 10:02 PM, Jamie Holly <span dir="ltr">&lt;<a href="mailto:hovercrafter@earthlink.net" target="_blank">hovercrafter@earthlink.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div>If you&#39;re using Drupal 7, it would be
      better to use the built in archiver class. It&#39;s used in
      update_manager_archive_extract in
      modules/update/update.manager.inc:<br>
      <br>
<a href="https://api.drupal.org/api/drupal/modules%21update%21update.manager.inc/function/update_manager_archive_extract/7" target="_blank">https://api.drupal.org/api/drupal/modules%21update%21update.manager.inc/function/update_manager_archive_extract/7</a><span class="HOEnZb"><font color="#888888"><br>

      <br>
      <br>
      <pre cols="72">Jamie Holly
<a href="http://hollyit.net" target="_blank">http://hollyit.net</a></pre></font></span><div><div class="h5">
      On 1/27/2014 2:20 AM, Swatee Karpe wrote:<br>
    </div></div></div><div><div class="h5">
    <blockquote type="cite">
      <div dir="ltr">Hi all,
        <div><br>
        </div>
        <div>I am using drupal 7 and I want extract the zip file and
          save the extracted folder into files directory. I am taking
          zip file from one of my content type.</div>
        <div><br>
        </div>
        <div>For this I am trying to use ZipArchive class. </div>
        <pre><span style="font-family:arial"> $zip = new ZipArchive;</span>
</pre>
        <div>
          <div> $unzip = $zip-&gt;open($filename);</div>
          <div><br>
          </div>
          <div>
            <pre>ZipArchive Object
(
    [status] =&gt; 0
    [statusSys] =&gt; 0
    [numFiles] =&gt; 0
    [filename] =&gt; 
    [comment] =&gt;  </pre>
            <div>)</div>
          </div>
          <div><br>
          </div>
          <div>After printing $zip i get the empty array as above.<br>
          </div>
          <div><br>
          </div>
          <div>Do any one know why this is not working in my case?</div>
          <div>Or any one know other way to extract file and save it to
            folder.</div>
          <div><br>
          </div>
          <div>Thanks in advance.</div>
          <div>--</div>
          <div dir="ltr">Swatee Amit Karpe<br>
            <br>
          </div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
    </blockquote>
    <br>
  </div></div></div>

<br>--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Thanks &amp; Regards,<br>Swatee Amit Karpe<br>
<br></div>
</div>