php - Curl is not working on my live server -
i have using sms gateway api on server
$live_url = "http://sms6.routesms.com:8000/bulksms/bulksms?username=xxx&password=xxx&type=1&dlr=0&destination=xxx&source=routesms&message=curlsecond"; $ch = curl_init(); curl_setopt($ch, curlopt_url, $live_url); curl_setopt($ch, curlopt_header, 0); curl_exec($ch); curl_close($ch);
for this,
if var_dump(curl_exec($ch));
, showing false
if var_dump(curl_getinfo($ch));
, showing like
array(26) { ["url"]=> string(153) "http://sms6.routesms.com:8000/bulksms/bulksms?username=xxx&password=xxx&type=1&dlr=0&destination=xxx&source=routesms&message=curlsecond" ["content_type"]=> null ["http_code"]=> int(0) ["header_size"]=> int(0) ["request_size"]=> int(0) ["filetime"]=> int(-1) ["ssl_verify_result"]=> int(0) ["redirect_count"]=> int(0) ["total_time"]=> float(62.345893) ["namelookup_time"]=> float(0.08692) ["connect_time"]=> float(0) ["pretransfer_time"]=> float(0) ["size_upload"]=> float(0) ["size_download"]=> float(0) ["speed_download"]=> float(0) ["speed_upload"]=> float(0) ["download_content_length"]=> float(-1) ["upload_content_length"]=> float(-1) ["starttransfer_time"]=> float(0) ["redirect_time"]=> float(0) ["certinfo"]=> array(0) { } ["primary_ip"]=> string(0) "" ["primary_port"]=> int(0) ["local_ip"]=> string(0) "" ["local_port"]=> int(0) ["redirect_url"]=> string(0) "" }
what have do?
i can't understand issue?
i have tried 1 more way, instead of curl, have used
file($live_url);
this not working
please cross check curl installed on server, if curl not installed try following.
if ubontu server run
sudo apt-get install php5-curl
restart server
sudo service apache2 restart
alternatively, if using php-fpm, you'll need restart php5-fpm instead
sudo service php5-fpm restart
hope works ...
Comments
Post a Comment