0

Hi,
I am working on this function.buts its not sending text message($msg) to user($to)

function sendSMS($mobile, $msg, $sender, $sendPass, $sendID)
    {
        $msg=urlencode($msg);
        $ch = curl_init();
        $url="abksms.com/pushsms.php?username=cs&password=6117&sender=STIA&to=$mobile&message=$msg";
        //echo $url;
        //$url=urlencode($url);
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_HEADER, 0);
        curl_setopt($ch, CURLOPT_POST, 1)or die("error1");
        curl_setopt($ch, CURLOPT_POSTFIELDS, $curlPost);
        $data = curl_exec($ch);
        curl_close($ch);
        return $data;
        //return substr($data,0,1);
    }
3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by jacob21
0

yes twiss.It is abksms.com
Its showing correct value in $url
When we execute this $url value in the browswr,its working i.e. sending sms.
but all the code after $url not working

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.