curl-and-php
Re: Not able to follow redirections
Date: Fri, 6 Jul 2007 23:20:41 +0200 (CEST)
On Thu, 5 Jul 2007, Gowranga wrote:
> Thanks for your mail. I used curl to download a form, and in order to get
> authenticated on a remote site, tried the script:
[...]
> I tried using POST method and pass credentials via POSTFIELD variables but
> the remote site bailed me out, for, I guess the "action" was a relative
> link.5B
You seem to be guessing blindly how to do this. Use LiveHTTPHeaders to record
a manual "login", then use curl (with --trace-ascii) to work out the exact
way to reproduce it (--trace-ascii of course used to verify that the protocol
parts look similar enough to the the original manual approach) and then you
translate it over to use PHP/CURL again (possibly curl --libcurl can help you
do that faster).
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.html _______________________________________________ http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-phpReceived on 2007-07-06