Jump to content

PHP Curl - couldn't connect to host


Giri J

Recommended Posts

Hi,

 

I'm trying curl. I was successful when I worked it on my laptop.

 

But when I bought the files to office and tried to run the php it gives me a error

"couldn't connect to host "

 

What could be the reason and Is there any solution. i'm using wamp 2.0

 

Thanks in advance

Giri.

Link to comment
Share on other sites

The key here could be the word "office"

 

If you're running the script on the company server then it could be a firewall issue. If you're running this remotely (ie. off external web space) then check connection details like username etc.

 

Other than that, I've no idea what could be up not having used cURL before!

Link to comment
Share on other sites

  • 7 months later...

curl couldn't connect to host - unless it is localhost ???

 

if U try aLL ( copying ssleay32.dll, libeay32.dll, uncommenting php.ini, and tah msvcrt.dll ) and that freakin CURL don't work on ur Windows Xp installation, ( only CURL works on requests to localhost but not external )

 

u probably are miissing something basic ::

 

curl_setopt($curl, CURLOPT_PROXY,"localhost:80");

 

( exists other way to set it )

 

THIS finally WORKS FOR ME, now i believe in the web appz again... ( this chunky thing takes several days of my development )

 

pD :: i hope i help you ( as other helped me on the past )

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.