Tuesday, 6 August 2013

cURL not working

cURL not working

I have been having some issue using a php cURL script. It worked fine on
my localhost, but it does not work on my server. My server can
successfully execute other curl script except this one. This is the result
of print_r(curl_getinfo($ch)); from my server:
Array ( [url] => http://xx.xx.xx.xx:8080/bulksms/bulksms [content_type] =>
[http_code] => 0 [header_size] => 0 [request_size] => 0 [filetime] => -1
[ssl_verify_result] => 0 [redirect_count] => 0 [total_time] => 15.00012
[namelookup_time] => 0.000145 [connect_time] => 0 [pretransfer_time] => 0
[size_upload] => 0 [size_download] => 0 [speed_download] => 0
[speed_upload] => 0 [download_content_length] => -1
[upload_content_length] => -1 [starttransfer_time] => 0 [redirect_time] =>
0 [certinfo] => Array ( ) [primary_ip] => xx.xx.xx.xx [primary_port] =>
8080 [local_ip] => [local_port] => 0 [redirect_url] => )
Here is the result of print_r(curl_getinfo($ch)); from my localhost:
Array ( [url] => http://xx.xx.xx.xx:8080/bulksms/bulksms [content_type] =>
text/html;charset=UTF-8 [http_code] => 200 [header_size] => 141
[request_size] => 178 [filetime] => -1 [ssl_verify_result] => 0
[redirect_count] => 0 [total_time] => 0.89 [namelookup_time] => 0
[connect_time] => 0 [pretransfer_time] => 0 [size_upload] => 0
[size_download] => 4 [speed_download] => 4 [speed_upload] => 0
[download_content_length] => 4 [upload_content_length] => 0
[starttransfer_time] => 0.89 [redirect_time] => 0 [certinfo] => Array ( )
[primary_ip] => xx.xx.xx.xx [primary_port] => 8080 [local_ip] => 127.0.0.1
[local_port] => 3925 [redirect_url] => )
Note: xx.xx.xx.xx represent the IP of the remote site am connection to.
What could be the cause, and how do I fix this? Any help pls?

No comments:

Post a Comment