Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Mar 2012
    Posts
    19
    Thanks
    4
    Thanked 0 Times in 0 Posts

    How to automatically get a page that need to log in first

    How to get the data from a page say "http://www.example.com/data.php", which requires user login first through php?
    I can view this page throw browser, after log in through, say "http://www.example.com/action_login.php".
    I was told that:
    first: send a Post request to action_login.php with my username and password, then I will get the cookies in the response.
    then: send a request to data.php with cookies.
    I don't know how to achieve that.

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,531
    Thanks
    8
    Thanked 1,091 Times in 1,082 Posts
    A lot of questions come to mind, for your post ...

    Will this be for one username and password, or several users?
    How are you managing those usernames and passwords?
    Are you using MySQL for a user database?

    You need to step back a few squares and fill us in with what you current have in place.
    How you know what the usernames and passwords are will create different solutions.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •