Fetch a page after login

Help
Pieter
2005-01-29
2013-05-30
  • Pieter
    Pieter
    2005-01-29

    Hi,

    I tried with the code below to fetch data from an url after loging in.

    But when I fetch the data there is still the text from that site "acces denied", so maybe I have to change something on the code below? Does someone have a suggestion?

    $snoopy = new Snoopy;

    $submit_url = "http://www.tradedoubler.com/pan/login";

        $submit_vars["name"] = "login";
        $submit_vars["j_username"] = "####USERNAME####";
        $submit_vars["j_password"] = "####PASSWORD####";*/

           
        $snoopy->submit($submit_url,$submit_vars);

        $snoopy->fetch("http://www.tradedoubler.com/pan/reports/Epi?cache=invalidate&navProgramId=&navOrganizationId=&reportSelection=true&program_id=0&affiliate_id=0&period=custom_period&reportType=csv&startDay=".date("d")."&startMonth=".date("m")."&startYear=".date("Y")."&endDay=".date("d")."&endMonth=".date("m")."&endYear=".date("Y")."&showDeleted=false&nrOfCols=0");
       
        print $snoopy->results;

     

  • Anonymous
    2011-05-30

    Did you solve this?
    I've just spent weeks learning sql, working with the data in php, snoopy, DOM… and now I find out the PHP server is not logged in.

    Does anybody know how to pass or re-create the needed cookies for a website's login to snoopy to show them when requesting the page?

    I see snoopy has settings for username and password, but it doesn't seem to be the same thing (is that .htaccess login?)

    I'd so hate having to re-write the whole code in JavaScript to use my browser's login cookies.

    Thanks.

     
  • Merlin
    Merlin
    2011-07-01

    check the post string,maybe have some hidden post data.
    you can use httpwatch to monitoring the data following when you post the data.
    so, first you must make sure that the data you post is right and  complete