Dear All
Can any one provide my the help and how could I send an EMS logo and tone to
ordinary nokia phone?
when i tried to send a wappush message to a mobile it just vibrates and
doesn't understand the contents of the file which was sent, incase of
operatorlogo it gives an empty reply and for ringtone it only vibrates for
7 seconds, and when message is send smsbox (log) displays a message with
content < j > , i think i am not specifying the proper udh or something
else? i have tried many but couldn't got desired result
<?php
function sendwappush ($fields, $kannel, $debug=0) {
$fields[udh] =
//'%0B%05%04%15%8A%00%00%00%03%02%01%01';
// voice msg'%04%01%02%04%01';
//opertor logo
'%06%05%04%15%82%00%00';
//'%06%05%04%15%81%00%00';
//simple msg'%04%0E%06%FD%E8';
//'%07%06%05%15%82%01%01';
// service msg'%06%05%04%0B%84%23%F0';
//'%06%05%04%15%81%23%00';
$fields[text] = '%1B%06%01%AE%02%05%6A%00%45%C6%0C%03'.
hex_encode($fields[link], '%').
'%00%01%03'.
hex_encode($fields[title], '%').
'%00%01%01';
unset ( $fields[title], $fields[link] );
while(list($k,$v) = each($fields)) {
if ( $v != "" ) {
$string .= "&$k=$v";
}
}
$request = 'http://'.$kannel[host].':'.$kannel[port].
'/cgi-bin/sendsms'.
'?user='.$kannel[user].
'&pass='.$kannel[pass].
$string;
$result = @file( $request );
echo "$request";
//header( "Location: $request");
return 'ok';
}
function hex_encode( $text, $joiner='' ) {
for ($l=0; $l<strlen($text); $l++) {
$letter = substr($text, $l, 1);
$ret .= sprintf("%s%02X", $joiner, ord($letter));
}
return $ret;
}
$fields = array (
$fields = array (
from => '7707',
to => '%2b923339633733',
link => 'SCKL15820000010201
3062F2200A00480e01fffffffffffff803ffffffe1fffffff003ffffffc07fffffe007fffffe
5a007e780007fffff840000000000fffffc0006c0000003ffffc00000000',
//'http://localhost/khan.mid',
//'http://www.bigfoto.com/sites/main/aegeri-lake-switzerland.JPG',
title => 'Done'
);
$kannel = array (
host => '192.168.0.130',
port => 7707,
user => '<deleted>',
pass => '<deleted>'
);
$result = sendwappush ( $fields, $kannel );
?>