Are you saying the phone receives the content as unsupported? You
need to first determine that mbuni correctly parses the content and
creates an MMS message.
I also would advise however that you use a much simpler sendmms
interface call: Do a GET URL call on the sendmms interface, passing
it the content via a URL with the content-url CGI parameter. The
sendmms interface will then fetch the content itself. Less prone to
bugs.
On Aug 29, 2007, at 20:02, Ihab Tawfig wrote:
Hi ,,
we have been trying , unsuccessfully , to send binary files(midi or
jpg) through mbuni VAS interface using PHP scripting ,
the content received as (unsupported format) can you please help us
with this issue ?
php script is :
<?php
$content , $content_type, $content_name // Variables taken from
database where $content is a file stored in binary format in mysql
$remote_server=" 212.212.212.221";
$remote_url="/cgi-bin/sendmms?
username=XXX&password=XXXXx&from=1000&to=
$msisdn&subject=Enjoyy&vasid=XXX";
$header ="POST $remote_url HTTP/1.1\r\n";
$header .="Host: $remote_server\r\n";
//$header .="Connection: keep-alive\r\n";
$header .="Content-Type:multipart/form-data ; boundary=
\"_boundary_13251666_1188062078_G_f_bd654384729\"\r\n";
$data="--_boundary_13251666_1188062078_G_f_bd654384729\r\n";
$data .="Content-Type: $content_type\r\n";
$data .="Content-Disposition:form-data; name=\"content\";
filename='$content_name'\r\n";
$data .="Content-Transfer-Encoding: base64\r\n\r\n";
$data .=$content."\r\n";
$data .="--_boundary_13251666_1188062078_G_f_bd654384729--\r\n";
$header .= "Content-length: " . strlen($data) . "\r\n\r\n";
// Open the connection
$fp = fsockopen($remote_server, 10001);
if (!$fp) {
echo "ERROR: $errno - $errstr<br />\n";
} else {
// then just=20
fputs($fp, $header.$data);
while (!feof($fp)) {
echo fgets($fp, 128);
}
}
fclose($fp);
}
?>
Thank you in advance for your kind help
_______________________________________________
Users mailing list
[email protected]
http://lists.mbuni.org/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://lists.mbuni.org/mailman/listinfo/users