Hi all, I have a trouble with Curl, I really dont know what happen ! This is code: $ch = curl_init('https://perfectmoney.com/acct/confirm.asp'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0"); if(curl_exec($ch) === false) { echo 'Curl error: ' . curl_error($ch).'|'.curl_errno($ch); } else { echo 'Operation completed without any errors'.curl_errno($ch); } curl_close($ch); PHP: I run this script in my localhost, it work properly. But when i uploaded to 2 servers and ran it, It returns an error: Curl error: couldn't connect to host|7 Otherwise, if i replace URL by "https://api.libertyreserve.com/xml/transfer.aspx", it works properly(in both localhost and server). Can someone help me with this problem ?
CURL error 7 means that it couldn't connect to the domain. If other domains work, and you're sure the URL is valid, then a setting somewhere is mixing stuff up. It could be that domain is blocked, or the security certificate is causing problems
check on another server.. there may be some problem in the server you are running.. it worked fine on my server when i tested with your URL
yes, i tested with 3 server, they have the same problem, CAN NOT CONNECT HOST ! but when i try to run in my localhost, it is good. work properly. prat20009: you test in your localhost or server ? spyka: yes, URL is correct