Bluehost.com Web Hosting $6.95

Test a zip file for validity

This is a discussion on Test a zip file for validity within the PHP General forums, part of the PHP Programming Forums category; Hello all, How do I go about checking if a file is a zip file? Wrapping the zipinfo utility in ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-02-2003
Ivo Pletikosic
 
Posts: n/a
Default Test a zip file for validity

Hello all,

How do I go about checking if a file is a zip file?

Wrapping the zipinfo utility in php did not help since it does not return an
exit code whether it succeeded or not.

Thanks,

IP



Reply With Quote
  #2 (permalink)  
Old 08-02-2003
Curt Zirzow
 
Posts: n/a
Default Re: [PHP] Test a zip file for validity

* Thus wrote Ivo Pletikosic (ivo@benetech.org):
> Hello all,
>
> How do I go about checking if a file is a zip file?
>
> Wrapping the zipinfo utility in php did not help since it does not return an
> exit code whether it succeeded or not.


I'm assuming the zipinfo your talking about is part of the unzip
package. You should use unzip to test the files

unzip -t file.zip

will check the checksum for each file.

'man unzip' for further details.

Curt
--
"I used to think I was indecisive, but now I'm not so sure."
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 11:59 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0