request for php script using kanel gateway

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 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_response = “”;
$url = parse_url($link);
//$fp = fsockopen($url[host], 80, $err_num, $err_msg, 30) or die("Socket-open
//failed–error: “.$err_num.” “.$err_msg);
$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);
echo $http_response;

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;

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://”


Sponsor our Newsletter | Privacy Policy | Terms of Service