In article <030401c149c2$7f2fb2c0$0b01a8c0@rob>, [EMAIL PROTECTED] (Rob)
wrote:
> Is there a simple way for a script to scan a file and know if it is a valid
> file type? What I mean is if I have an mpeg file that has been renamed to
> something like movie.html or movie.gif is there a way to know that it is not
> a valid html or gif file?
you need to use magic ;)
http://search.cpan.org/search?dist=File-MMagic
--
brian d foy <[EMAIL PROTECTED]> - Perl services for hire
CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html
Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]