Dear users,

How would I go about sending a fakesms from my browser? I find it easy
enough to do with a real message as you can send messages like:
http://localhost:13013/cgi-bin/sendsms?username=tester&password=fbar&to=123&from=321&text=Hello+world

however if I wanted to test my html form and php script with fake sms
instead how would I go about sending them to kannel via php?
at the moment I'm doing the following with a real sms (as the above works):
function
sendfakesms($smsuser,$smspassword,$reciever,$serviceprovider,$message,$sendp
ort) {
 $sendmessage = ereg_replace(" +", "+", $message);
 $fp = fsockopen ("localhost", $sendport, $errno, $errstr, 30);
   if (!$fp) {
     echo "$errstr ($errno)<br>\n";
   } else {
    fputs ($fp, "GET
/cgi-bin/sendsms?user=$smsuser&password=$smspassword&to=$reciever&from=$serv
iceprovider&text=$sendmessage HTTP/1.0\r\nHost: localhost\r\n\r\n");
    while (!feof($fp)) {
     $str .= fgets ($fp,128);
    }
    fclose ($fp);
   }
}


cheers for any help on how to send a fakesms via a php script,
Jarl




Reply via email to