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

curl-and-php

Re: Using cURL to Retrieve Data from Password-Protected Sites

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 18 Dec 2006 23:02:16 +0100 (CET)

On Mon, 18 Dec 2006, Meghan Edmonds wrote:

> I am getting a "302 Moved Temporarily" header. The body returns "This
> document you requested has moved temporarily. It's now at..." I am new to
> this and do not fully understand what this means, but from what I've read
> here I believe it has to do with the cookie that is being created. If I
> uncomment the CURLOPT_FOLLOWLOCATION line, it routes me to the login page of
> the site.

It most likely means that you need to login by POSTing your credentials to the
site and then keep cookies etc.

If you check the response headers from the server, or simply use
LiveHTTPHeaders, you'll know.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2006-12-18