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 6210543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:10:41+00:00 2026-05-24T06:10:41+00:00

I need to scrape from a website that requires authentication, that is a user

  • 0

I need to scrape from a website that requires authentication, that is a user must login by supplying there username and password in an html form. The connection is not secure. I plan on using the Pear framework to format the request. I’m stuck at the first part which is posting the login information. How can I submit form data? Thanks in advance for any help.

I’ve got fiddler2 installed but am not sure what to look for when I do the login manually.

I’m using curl and getting some success. I deleted all cookies in my web browser and went to the site to login. In fiddler it gave me the following request headers

GET http://example.com/niceday/dirlogin.php HTTP/1.1
Accept: text/html, application/xhtml+xml, */*
Accept-Language: en-CA
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
Accept-Encoding: gzip, deflate
Host: example.com
DNT: 1
Connection: Keep-Alive
Cookie: chatRoomUserID=119972; ASPSESSIONIDSSRQCCBR=26jqrt3f8dus2l2s42g4r9npp5

I’m confused about the last one, am I requesting a cookie?

In my script I faked the first request with

curl_setopt($ch,CURLOPT_HTTPHEADER, array('GET http://example.com/niceday      /dirlogin.php     HTTP/1.1',
'Accept: text/html, application/xhtml+xml, */*',
'Referer: http://r2sports.bkoehler.j43.ca/tourney/tourneyTop.php?TID=3206',
'Accept-Language: en-CA',
'User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)',
'Accept-Encoding: gzip, deflate',
'Connection: Keep-Alive',
'DNT: 1',
'Host: r2sports.bkoehler.j43.ca',
'Cookie: chatRoomUserID=995222; ASPSESSIONIDSSRQCCBR=26jqrt3f8dus2l2s42g4r9npp5'));
  • 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-24T06:10:42+00:00Added an answer on May 24, 2026 at 6:10 am

    You might consider using this: http://www.php.net/manual/en/book.curl.php#90821 and setting a cookie file location, so your script can remain authenticated. Next time it will contact that website it will use the cookies it previously saved in a file in the cookie file location.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to scrape data from a site, but it requires my login first.
I need a javascript function to automatically login and then scrape some detail from
I need to migrate our website from a proprietary CMS that uses active server
I need to scrape news announcements from this website, Link . The announcements seem
I need to scrape Form 10-K reports (i.e. annual reports of US companies) from
How to screen scrape a particular website. I need to log in to a
I need advice. I inherited a website that's been around a long time. The
I've just started a small library which will need to screen scrape from various
I need to scrape some content from a HTTP response with Java. The required
I want to scrape string data from some binary text files that contain embedded

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.