Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6142961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:27:30+00:00 2026-05-23T18:27:30+00:00

Question: Is it possible to log into a site then read information off the

  • 0

Question:
Is it possible to log into a site then read information off the site under that user (in PHP)?

example:
Many websites are dynamic and have php drawing information from databases. Lets say example.com had a login.

While logged in the page example.com/test.php displayed: “hello user”, and when not logged in would display : “you’re not a user sign in here”

Lets say the authentication process was through sessions, the user would login by posting a form with tags “user” and “pass” if correct would start a session that would allow the user to see the message for them on example.com/test.php

Question:
Is it possible to log into a site then read information off the site under that user?

I’ve been looking around and am not sure how to approach this. Anything would help. Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T18:27:31+00:00Added an answer on May 23, 2026 at 6:27 pm

    you can (with curl)

            $ckfile = tempnam ("/tmp", "CURLCOOKIE");
            $ch = curl_init("http://example.com/index.php");
            curl_setopt($ch, CURLOPT_COOKIEFILE, $ckfile);
            curl_setopt($ch, CURLOPT_COOKIEJAR, $ckfile);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
            $output = curl_exec ($ch);
            curl_close($ch);
    
    
            $ch = curl_init();
            $fields = array(
                    'username' => 'genesis',
                    'pass' => 'pass',
                    'other' => 'post fields'
            );
            foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }
            curl_setopt($ch, CURLOPT_URL, "http://example.com/login.php");
            curl_setopt($ch, CURLOPT_HEADER, 1);
            curl_setopt($ch, CURLOPT_COOKIEFILE, $ckfile);
            curl_setopt($ch, CURLOPT_COOKIEJAR, $ckfile);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($ch, CURLOPT_AUTOREFERER, 1);
            curl_setopt($ch, CURLOPT_POST,1);
            curl_setopt($ch, CURLOPT_POSTFIELDS,$fields_string);
            curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
            $result = curl_exec($ch);
            curl_close($ch);
    
            $ch = curl_init();
            curl_setopt($ch, CURLOPT_URL, "http://example.com/logged_page.php");
            curl_setopt($ch, CURLOPT_HEADER, 1);
            curl_setopt($ch, CURLOPT_COOKIEFILE, $ckfile);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($ch, CURLOPT_COOKIEJAR, $ckfile);
            curl_setopt($ch, CURLOPT_AUTOREFERER, 1);
            curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
            $needed_information = curl_exec($ch);
            curl_close($ch);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Alright, possible a naive question here. I have a service that needs to log
I've made CI authentication controller allowing user to log into the site, and after
Question: Is it possible to construct a web page that has a script to
Question: Is is possible, with regex, to match a word that contains the same
Short question: Is it possible to do a redirection, say when a user isn't
I'm trying to see if it's possible to log into a wifi access point
I have a webapp that currently stores all of a user's searches into a
I have a simple question. Is it possible to somehow get a log of
Question Is it possible to get the version of the Java Plugin being used
Question: Is it possible in back end code (not in the code behind but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.