Re: cURL and response code 302 [message #182101 is a reply to message #182100] |
Tue, 09 July 2013 15:20 |
Arno Welzel
Messages: 317 Registered: October 2011
Karma:
|
Senior Member |
|
|
Am 09.07.2013 16:51, schrieb bill:
> On 7/9/2013 10:24 AM, Arno Welzel wrote:
>> Am 09.07.2013 16:09, schrieb bill:
>>
>>> On 7/8/2013 12:02 PM, Daniel Pitts wrote:
>>>> On 7/8/13 8:35 AM, bill wrote:
>>>> > when I have cUrl seet up with CURLOPT_FOLLOWLOCATION =>FALSE,
>>>> > I am getting a 302, moved temporarily.
>>>> >
>>>> > How do I find out the URL it is being redirected to ?
>>>> > The effectiveURL that is returned is the one I sent the request
>>>> > to.
>>>> >
>>>> > bill
>>>>
>>>> The "Location" response header contains the desired URL.
>>>>
>>>> See:
>>>> <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3>
>>>
>>> Thanks, is there a way to obtain the Location response header
>>> from cURL ?
>>
>> Maybe this example in the documentation may help:
>>
>> <http://www.php.net/manual/en/function.curl-exec.php#80442>
>>
>>
>>
> actually, suggesting that I look at curlopt_header would have
> been more clear.
Maybe - but since it is also neccessary to check the header size to
separate the header from the body I refered to the example. And finally
you got the right hint - didn't you? ;-)
--
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
|
|
|