|
Posted by Jerry Stuckle on 12/26/06 16:01
devranger wrote:
> I have been reading up on what you suggested Rik and testing different
> options but I am still not successful in getting the results returned.
> I have set the curl_setopt($ch, CURLOPT_REFERER, $url); and also set up
> to curl sessions, one to capture the cookie and the other to post with
> the cookie (see below): I really feel it may have something to do
> with the long input names and : in the input name of my $data variable,
> but Jerry said the data vaiable was correct.
>
> Does anyone have any other suggestion on how I could get this working?
> Your help is much appreciated, I feel I have learned so much so far.
>
> Thank you!!!!
>
>
>
> $data="MasterTemplate:_PageTemplate:cphCenterContent:CenterContent:fcDropDownList=ATVs&MasterTemplate:_PageTemplate:cphCenterContent:CenterContent:zipTextBox=77090";
>
> $ch = curl_init();
> curl_setopt($ch, CURLOPT_URL,$url);
> curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
> curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
> curl_setopt($ch, CURL_ERROR, 1);
> curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie.txt");
> curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt");
> $result = curl_exec ($ch);
> curl_close ($ch);
>
> // create a new curl resource
>
> $ch = curl_init();
>
> // set URL and other appropriate options
> curl_setopt($ch, CURLOPT_URL, $url);
> curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
> curl_setopt($ch, CURLOPT_POST, true);
> curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
> curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
> curl_setopt($ch, CURL_ERROR, 1);
> curl_setopt($ch, CURLOPT_REFERER, $url);
> curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie.txt");
> curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt");
> curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 600);
> curl_setopt($ch, CURLOPT_TIMEOUT, 600);
>
> // grab URL, and return output
>
> $Contents = curl_exec($ch);
>
You're going to have to ask the owner of the data you wish to mine.
There are all kinds of ways of protecting data from mining, and only he
knows which one(s) he's using.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|