ID: 38340
User updated by: manikandan dot r at greynium dot com
Reported By: manikandan dot r at greynium dot com
-Status: Feedback
+Status: Open
Bug Type: cURL related
PHP Version: 5.1.4
New Comment:
I think following code snippet will help you to diagnose the problem.
$ch = curl_init($url);
curl_setopt ($ch, CURLOPT_FILE, $fp);
curl_setopt ($ch, CURLOPT_FAILONERROR, true);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_exec($ch);
echo curl_error($ch);
I have used the above code in my php file and it give me an "Empty
reply from server" instead of the url content.
Actually i used to pass city name in url dynamically, the issue is its
working well with some cities.
But there wont be any problem with city names it seems.
Hope above explanation help you to give me an solution
---
Mani
Previous Comments:
------------------------------------------------------------------------
[2006-08-05 10:45:25] [EMAIL PROTECTED]
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc.
If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.
------------------------------------------------------------------------
[2006-08-05 07:03:51] manikandan dot r at greynium dot com
Description:
------------
When i am accessing the remote url through CURL, got the following
error:
'Empty reply from server'
How to resolve it?
Thanks in advance
--
Mani
Reproduce code:
---------------
/* crawling starts here */
$ch = curl_init($url);
curl_setopt ($ch, CURLOPT_FILE, $fp);
curl_setopt ($ch, CURLOPT_FAILONERROR, true);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
/* if crawling fails, mail will be sent */
if(!curl_exec($ch)) {
Expected result:
----------------
Expected to get the content of the remote url
Actual result:
--------------
'Empty reply from server'
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38340&edit=1