Page 1 of 1

Curl Problem, Can not connect hosts

Posted: Mon Feb 08, 2010 9:44 pm
by picos
Hello,
This is my code:

Code: Select all

 
$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);
 
When i run this script in my localhost, it works properly.
But when i uploaded to my server, it did not work and returned an error "can not connect to hosts"
I can load this URL from my brower, can someone please help me with this trouble ?
I have tried "http" instead of "https" but nothing change,

Re: Curl Problem, Can not connect hosts

Posted: Tue Feb 09, 2010 1:31 am
by klevis miho
Maybe your host doesn't have the cURL library installed

Re: Curl Problem, Can not connect hosts

Posted: Tue Feb 09, 2010 1:46 am
by picos
Curl was installed perfectly. When i try to replace other URL, it works.
But with this URL, it does not work.

Re: Curl Problem, Can not connect hosts

Posted: Tue Feb 09, 2010 3:13 am
by klevis miho
Don't know now, maybe its the https :(