Solved

Archive Zip Module

Posted on 2004-08-05
3
244 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
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Ever wondered how to display how many visitors you have online. In this tutorial I will show you an easy but effective way to display the number of online visitors in WhizBase. In this article I assume you have read my previous articles and know …
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 …
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now