I am getting response as sent when I am pasting below URL in browser
http://www.example.com/smpp/sendsms?username=demo&password=demo&to=1234567890&from=demo&text=Your order demo123 have been completed
But when I use:-
file_get_contents("http://www.example.com/smpp/sendsms?username=demo&password=demo&to=1234567890&from=demo&text=Your order demo123 have been completed");
I gets following error
Warning: file_get_contents(http://www.example.com/smpp/sendsms?username=demo&password=demo&to=1234567890&from=demo&text=Your order demo123 have been completed) [function.file-get-contents]: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\xampp\htdocs\test\index.php on line 4
I've tried using CURL but it is showing no output and sms not getting sent.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.example.com/smpp/sendsms?username=demo&password=demo&to=1234567890&from=demo&text=Your order demo123 have been completed");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
I've also un-commented extension=php_curl.dll
in php.ini file and restarted server. but Nothing works.