PHP: $_FILES all of them!

Associate
Joined
16 May 2005
Posts
680
I've got a service that supposed to be forwarding MMS attachments to my site, gif, jpeg, 3gp. As far as I know there won't be any field name attributed to them, is there any way of grabbing whatever attachment is sent in the posted info?
 
$_FILES['file']['tmp_name'] points to the local file, so to grab the file's contents you can just do

Code:
$contents = file_get_contents($_FILES['file']['tmp_name']);

If you're storing them locally, then you'll need to look into using move_uploaded_file() :)
 
Cheers for the input guys

Ended up having to do a callback to the server to retrieve the files. It's been an afternoon of test collecting, assessing and saving images and text from txt files sent on MMS.

Bluergh...
 
Back
Top Bottom