curl-and-php
Re: Using POST and POSTFIELDS with CURL
From: Richard Lynch <ceo_at_l-i-e.com>
Date: Tue, 1 Jan 2008 12:30:35 -0600 (CST)
Date: Tue, 1 Jan 2008 12:30:35 -0600 (CST)
On Mon, December 24, 2007 9:09 am, tpieretti_at_aol.com wrote:
> $randnum = rand(1,9999999);
> curl_setopt($ch, CURLOPT_COOKIEJAR, "/tmp/cookiejar-$randnum");
> curl_setopt($ch, CURLOPT_COOKIEFILE, "/tmp/cookiejar-$randnum");
The problem here is possibly that you are storing the cookies in some
different random file each time.
The application may be using those cookies to track users, and require
a 2-stage operation -- So you may need to visit a different page first
to get a valid Cookie, and THEN use those cookies as part of this
request to get what you want.
Try storing the cookies in the same file/jar all the time, and also
see if you can close your browser, surf DIRECTLY to the URL, and have
it work or not.
-- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So? _______________________________________________ http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-phpReceived on 2008-01-01