Page 1 of 1

Need Some HTTP_HEADER Help

Posted: Wed Feb 07, 2007 5:26 pm
by snowrhythm
Hi all, I'm writing a script to upload some files to a mysql DB and I've heard that you can just extract bits from the HTTP_HEADER
to get things like the file type, file size, and file name. Is this true? If so...those three things are just what I need, and i't d be fantastic
if someone could let me know how to do this. Thanks in advance.

Posted: Wed Feb 07, 2007 6:05 pm
by RobertGonzalez
stat() perhaps?

Posted: Wed Feb 07, 2007 7:28 pm
by feyd
The details found on the following may be of more use.

http://php.net/features.file-upload

Also, be aware that the type specified in $_FILES is unreliable. Analyze the file's contents. mime_content_type() may be of interest there.

Posted: Thu Feb 08, 2007 10:04 am
by snowrhythm
Hey thanks guys, both of those helped alot. Cheers -