cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Strange FOLLOW_LOCATION behavior

From: Stéphane Viaud-Murat <sviaud_at_madwaves.com>
Date: Mon, 11 Apr 2005 19:38:25 +0200

Hi all,

there's something I miss here... How come :

$ch = curl_init("http://sa.waterair.com");
 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
 $html = curl_exec ($ch);

Is returning an error 52 (Empty reply), while a command line :

 curl -L http://sa.waterair.com

Is returning the right HTML contents ? Why is the FOLLOW_LOCATION not
getting to the final page ?
I'm running curl 7.12.3 on Linux.

Please help...
Stephane
Received on 2005-04-11