curl php weird behaviour -


i have url if open in browser works , expected results.

when try content via php curl on server, code 7 error ( not connect host )

the same script working on local machine

this code i'm using :

$url = "http://test.com"; $ch = curl_init(); curl_setopt($ch, curlopt_url, $url);  curl_setopt($ch, curlopt_returntransfer, 1); $data = curl_exec($ch); 

is related headers ? or related php conf ?

your server not connect remote host.

error no [7] = "curle_couldnt_connect"

here detail error message:

https://php.net/manual/en/function.curl-errno.php


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -