Guest
2007-09-19T21:36:07Z
I am seriously considering using your MMS services but I need a bit of guidance on using PHP for processing the data returned in repsonse to the

http://www.intellisoftwa...mp;msgid=500110000000001 
&msgpart=cid1.gif

request specifically the data I will need to retrive will be an image, what exactly is going to be returned from the request? A number of http headers and data in the body I assume, but how to get the image data into a variable to store on the server? If I could see how to get it into the variable I can do the rest. Processing the post data from will be fine. But I am unclear on how to process the result of the http request.

Support
2007-09-20T09:10:16Z
The HTTP request will return the MMS message part in the response, so you can simply stream this to a file.

Here is example of a script to retrieve MMS message content and store it on your local file system:

<?php
$Username = "YourUsername";
$Password = "YourPassword";

$MMSFileStorageDir = "C:\\";

$From = $_REQUEST['from'];
$Text = $_REQUEST['text'];
$MsgId = $_REQUEST['msgid'];
$FileList = $_REQUEST['filelist'];

$FileListArray = explode ( ",", $FileList );

foreach ( $FileListArray as $MMSFilePart )
{
	echo "Retriving file $MMSFilePart...<br>";
	
	$URL = "http://www.intellisoftware.co.uk/smsgateway/retrievemms.aspx?";
	$URL .= "username=" . $Username . "&";
	$URL .= "password=" . $Password . "&";
	$URL .= "msgid=" . $MsgId . "&";
	$URL .= "msgpart=" . $MMSFilePart;

	copy($URL, $MMSFileStorageDir . $MsgId . "_" . $MMSFilePart  );
}
echo "MMS Retrieval Complete.";
?>
Guest
2007-09-20T09:32:10Z
Exellent, I will be contacting your sales dept shortly, superb suport on your part