I have an issue with sms gateway that is connected to kannel (gateway) using SMPP
Now my main problem is
I have akannel configuration file that is uploaded in server suppose at 192.168.0.80 now
what will be the receive.php content i.e coding so that it get connected to kannel config file
using port suppose 8888
this the receive.php file which i created:
$link = “http://192.168.0.82/smpp/kannel.config”;
$http_response = “”;
$url = parse_url($link);
print_r($url);
//$fp = fsockopen($url[host], 80, $err_num, $err_msg, 30) or die("Socket-open
//failed–error: “.$err_num.” “.$err_msg);
$username=“Test123”;
$pass = " password123”;
$fp = fsockopen($url[host], 7777, $username, $pass, 30) or die("Socket-open
failed–error ");
fputs($fp, “GET /$url[path]?$url[query] HTTP/1.0\n”);
fputs($fp, “Connection: close\n\n”);
while(!feof($fp)) {
$http_response .= fgets($fp, 128);
}
fclose($fp);
echo $http_response;
if($fp)
{
echo $id = $_GET[‘id’];
echo $dest = $_GET[‘mobileno’];
$mesg = $_GET[‘message’];
echo “
”;
$query = “insert into rough(sms_send_id,dest_mobile_no,messege) values (’$id’,’$dest’,’$mesg’)”;
echo $query;
mysql_query($query);
}
and the kannel.config file is
group = sms-service
group = sms-service
#name = nothing
keyword = default
#aliases = “noppy;niente”
text = “You asked nothing and I did it!”
get-url = “http://localhost/bongolive/rough.php?mobileno=%p&message=%r”
#post-url = “http://”
thanks…