1 Jan 2008 19:30
Re: Using POST and POSTFIELDS with CURL
Richard Lynch <ceo <at> l-i-e.com>
2008-01-01 18:30:35 GMT
2008-01-01 18:30:35 GMT
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-php
RSS Feed