script to login a website and navigate in the password protected area

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jonathan184
    New Member
    • Nov 2006
    • 154

    script to login a website and navigate in the password protected area

    Hi I am trying to make a script to login a website and

    after login > click on a link
    >click on another link
    Choose a date/time range and click a submit button.

    Now if there are no results send an email - no results found
    if there are results - send an email there are results.
    end of script

    so i was thinking this for a start but i do not know what to do from here.
    Code:
    [PHP]
    $Entered_UserNa me = ""; $Entered_PassWo rd = "";
    if(isset($HTTP_ COOKIE_VARS["UserName"]) &&
    isset($HTTP_COO KIE_VARS["PassWord"]))
    { $Entered_UserNa me = $HTTP_COOKIE_VA RS["UserName"];
    $Entered_PassWo rd = $HTTP_COOKIE_VA RS["PassWord"]; }
    if($Entered_Use rName != $UserName || $Entered_PassWo rd != $PassWord)
    { if($LogInPage != "") include($LogInP age); return(false); } else return(true);

    [/PHP]
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    This looks like part of a function (the return statements). So where is the rest of the code, such as the HTML form to login and the settings of $user, $password and $Loginpage variables?

    Ronald :cool:

    Comment

    • jonathan184
      New Member
      • Nov 2006
      • 154

      #3
      login page between the quotes would of been http://test

      [PHP]<? $Entered_UserNa me = "test"; $Entered_PassWo rd = "password";
      if(isset($HTTP_ COOKIE_VARS["UserName"]) &&
      isset($HTTP_COO KIE_VARS["PassWord"]))
      { $Entered_UserNa me = $HTTP_COOKIE_VA RS["UserName"];
      $Entered_PassWo rd = $HTTP_COOKIE_VA RS["PassWord"]; }
      if($Entered_Use rName != $UserName || $Entered_PassWo rd != $PassWord)
      { if($LogInPage != "http://localhost:8080/mydash/DashBoard/mydashLogin.jsp ") include($LogInP age); return(false); } else return(true);

      ?>
      [/PHP]

      Comment

      Working...