Solved

Archive Zip Module

Posted on 2004-08-05
3
270 Views
Last Modified: 2013-12-25
Hi

I am using the archive zip module too view whats inside zip files. Using this code:

 use Archive::Zip;
use Archive::Zip::MemberRead;

  $zip = new Archive::Zip("testdate.zip");
  $fh  = new Archive::Zip::MemberRead($zip, "testdate.txt");
  while (defined($line = $fh->getline()))
  {
      print $fh->input_line_number . "#: $line\n";
  }  $read = $fh->read($buffer, 32*1024);
  print "Read $read bytes as :$buffer:\n";

Though if the file is not my sever, but another address example
  $zip = new Archive::Zip("http://www.xx.com/test/testdate.zip");

Then it does'nt work!, anyone know how to get it get to work?

Thanks

Akbar
0
Comment
Question by:akzah
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 48

Accepted Solution

by:
Tintin earned 100 total points
ID: 11748903
Archive::Zip works with files, not URI's, so you need to download the zip file first, eg:

use LWP::Simple;
getstore('http://www.xx.com/test/testdate.zip','/some/path/testdate.zip');
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question