curl-and-php
Re: PHP - CURL - Custom authentication script
Date: Thu, 31 Mar 2011 10:59:07 -0400
Michael,
> I don't quite understand this part. What do you mean by this? "The POST string must also MATCH."
Great question.
I compare line by line the output of Live Headers to the curl verbose. I do character by character comparison of the POST string. Like Daniel replying yesterday, the post string may not be encoded correctly.
> I did a test on the url you provided. The referer is changing from page to page or not even present.
>
> Ok
This and your code tells me you're still trying to find a shortcut with followlocation.
Until you compare the 2 outputs (on paper, side by side) and make your script so that the verbose output mimics the FULL output of Live Headers, you may not find success for a long time. I would generate the code with multiple curl_exec (maybe 4 or more) changing the curlopt.... target, referer and post (T/F), etc to make the script request and get each page you see in Live Headers. It will lengthen your code, but probably shorten your time to success.
I can't be of any more assistance in this part of the matter.
David
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2011-03-31