Re: [PHP] Tesing Gzip files

2005-04-24 Thread Richard Lynch
On Sat, April 23, 2005 12:44 am, Prathaban Mookiah said:
 Is there a way to test if a .gz file is in a valid format. Functions like
 gzread, gzfile don't seem to care if the file is corrupt or not.

 gzeof also didn't work for me. I guess it is because it does not check for
 a
 valid .gz termination. Any ideas to go about doing this?

Google for gz and gzip and validity tests.

Most likely, you'll need to http://php.net/exec to test the files...

Or you could maybe add in the functionality to PHP itself with some C
hacking :-)

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Tesing Gzip files

2005-04-23 Thread The Disguised Jedi
I'd generate an MD5 sum on a file you know is valid, and compare it against 
that in your script.

On 4/23/05, Prathaban Mookiah [EMAIL PROTECTED] wrote:
 
 Hello,
 
 Is there a way to test if a .gz file is in a valid format. Functions like
 gzread, gzfile don't seem to care if the file is corrupt or not.
 
 gzeof also didn't work for me. I guess it is because it does not check for 
 a
 valid .gz termination. Any ideas to go about doing this?
 
 Thanks in advance.
 
 Cheers,
 
 Prathap
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
The Disguised Jedi
[EMAIL PROTECTED]

Now you have my $0.02. Or .01 Pounds, .014 Euros, or $0.025 CAN. I'm 
world-wide BABY!
PHP rocks!
Knowledge is Power. Power Corrupts. Go to school, become evil

Disclaimer: Any disclaimer attached to this message may be ignored. However, 
I must say that the ENTIRE contents of this message are subject to other's 
criticism, corrections, and speculations.

This message is Certified Virus Free