Edit report at http://bugs.php.net/bug.php?id=31481&edit=1
ID: 31481 Updated by: ras...@php.net Reported by: jason at merchant dot to Summary: curl isn't following redirects with a relative path Status: No Feedback Type: Bug Package: HTTP related Operating System: Windows XP Pro PHP Version: 4.3.10 New Comment: Those are not supposed to work. curl_init() takes a URL. None of the arguments in your example that don't work are URLs. Previous Comments: ------------------------------------------------------------------------ [2010-06-14 00:15:42] ktcox at rogers dot com This Works <?php $addpage = curl_init('http://localhost/updateindex.php'); $page = curl_exec($addpage); curl_close($addpage); echo "$page"; ?> The following don't work. <?php $addpage = curl_init('/updateindex.php'); $page = curl_exec($addpage); curl_close($addpage); echo "$page"; ?> <?php $addpage = curl_init('updateindex.php'); $page = curl_exec($addpage); curl_close($addpage); echo "$page"; ?> <?php $addpage = curl_init('./updateindex.php'); $page = curl_exec($addpage); curl_close($addpage); echo "$page"; ?> ------------------------------------------------------------------------ [2005-01-31 22:34:22] sni...@php.net No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. ------------------------------------------------------------------------ [2005-01-11 04:54:37] sni...@php.net 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 avoid embedding huge scripts into the report. ------------------------------------------------------------------------ [2005-01-11 00:07:59] jason at merchant dot to Description: ------------ I am grabbing an https:// page using curl and that page redirects using a relative path like "/page1.php". curl is failing to follow this path. I have tried replacing the relative path with an absolute path on the page I'm grabbing and that worked so I know the problem lies in the relative path redirection. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=31481&edit=1