PHP & CURL Forum
PHP Automation Coding May 13th, 2008Just a quick post about a forum I found today. If you’re looking for other people to talk about CURL and PHP with I came across this forum the other yesterday. Doesn’t seem super active however there might be some answers to your questions in the history.
http://curl.phptrack.com/forum/viewforum.php?f=1










July 19th, 2008 at 11:26 am
I opened the browser with this url, http://77.666.555.44:8080/file/test.jsp
That is a sample server address
It works fine in the browser, I see the page.
But when I run it through cUrl it stalls and returns a blank page.
The error message I get from cUrl is “couldn’t connect to host”
Any reason why?
I am new to PHP
If anyone knows the answer please help
I have been stuck on this for weeks.
Any advice will be appreciated.
July 19th, 2008 at 11:27 am
the PHP code:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, “http://77.666.555.44:8080/file/test.jsp”);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo curl_error($ch);
} else {
echo $response;
curl_close($ch);
}