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

  • SEARCH
  • Home
  • 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 162665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T11:25:53+00:00 2026-05-11T11:25:53+00:00

I have done this code to login,to retrieve and show a webpage : //

  • 0

I have done this code to login,to retrieve and show a webpage :

  // login info array         string postData = 'user_name=tler';         postData += '&user_password=lodvader';         byte[] data = Encoding.ASCII.GetBytes(postData);          // web request         WebRequest req = WebRequest.Create('http://www.lol.com/login.php');         req.Method = 'POST';         req.ContentType = 'application/x-www-form-urlencoded';         req.ContentLength = data.Length;          // stream response to string         Stream newStream = req.GetRequestStream();         newStream.Write(data, 0, data.Length);         newStream.Close();         StreamReader reader = new StreamReader(req.GetResponse().GetResponseStream(), Encoding.GetEncoding('iso-8859-1'));          string responseString = reader.ReadToEnd();          // retrieve text within title         Regex rx = new Regex(@'(?<=<title>).+?(?=</title>)');          var variable = rx.Matches(responseString);          // output         Console.WriteLine(variable[0]);          Console.ReadLine(); 

But, the following page after login is an html redirect like :

<meta http-equiv='refresh' content='3; URL='bb.php'> 

How to follow this link and retrieve next page ?

  • 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. 2026-05-11T11:25:54+00:00Added an answer on May 11, 2026 at 11:25 am

    I have found the time to finish it, here the response ( i tried to be as clear as possible ) :

            // Cookie for our session         var cookieContainer = new CookieContainer();          // Encode post variables         ASCIIEncoding encoding=new ASCIIEncoding();         byte[] loginDataBytes = encoding.GetBytes('user_name=belaz&user_password=123');          // Prepare our login HttpWebRequest         HttpWebRequest request = (HttpWebRequest)WebRequest.Create('http://blabla.fr/verify.php');         request.Method = 'POST';         request.ContentType = 'application/x-www-form-urlencoded';         request.CookieContainer = cookieContainer;         request.ContentLength = loginDataBytes.Length;          // Write encoded post variable to the stream         Stream newStream = request.GetRequestStream();         newStream.Write(loginDataBytes, 0, loginDataBytes.Length);         newStream.Close();          // Retrieve HttpWebResponse         HttpWebResponse response = (HttpWebResponse)request.GetResponse();          // Link the response cookie to the domain         cookieContainer.Add(new Uri('http://blabla.fr/'),response.Cookies);          // Prepare our navigate HttpWebRequest, and set his cookie.         HttpWebRequest requestProfile = (HttpWebRequest)WebRequest.Create('http://blabla.fr/bb.php');         requestProfile.CookieContainer = cookieContainer;          // Retrieve HttpWebResponse         HttpWebResponse responseProfile = (HttpWebResponse)requestProfile.GetResponse();          // Retrieve stream response and read it to end         Stream st = responseProfile.GetResponseStream();         StreamReader sr = new StreamReader(st);         string buffer = sr.ReadToEnd(); 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 118k
  • Answers 118k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Here is an example (including creating an event) for ASP.NET… May 11, 2026 at 11:34 pm
  • Editorial Team
    Editorial Team added an answer You might consider looking at Isolated Storage which is a… May 11, 2026 at 11:34 pm
  • Editorial Team
    Editorial Team added an answer You cannot prevent this from happening. However, you can enable… May 11, 2026 at 11:34 pm

Related Questions

I'm in the design stage for an app which will utilize a REST web
I have a web reference for our report server embedded in our application. The
We are in the process of porting a legacy system to .NET, both to
I have done this the other way many times as it makes sense (the

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.