am trying to send SMS using the url but it's not working the result is empty this is my code
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
/**
* Ask cURL to return the contents in a variable
* instead of simply echoing them to the browser.
*/
//Using Proxy
// curl_setopt($ch, CURLOPT_PROXY, '212.138.39.84:8080');
//
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
/**
* Execute the cURL session
*/
$result = curl_exec ($ch);
/**
* Close cURL session
*/
curl_close ($ch);
$result=explode("
",$result);
$result=$result[(count($result)-1)];
$result;
can anyone help me ???
try this
<?php
$ch = curl_init ($url);
/*
* Send SMS
*/
curl_setopt ($ch , CURLOPT_RETURNTRANSFER , TRUE);
curl_setopt($ch , CURLOPT_TIMEOUT , 30);
/*
* Execute command and send sms
*/
$result = curl_exec ($ch);
?>
you can write below line for print out put
<?php
echo "<pre>";
print_r($result);
echo "</pre>";
?>
see output after parse or expload result.