Jump to content

How To Scrape A Page That Uses Prompt Login


ultimatum

Recommended Posts

Hey guys,

 

I have a page that I need to scrape using PHP. This page requires login credentials (which I have) but I don't know how to pass those values to a login prompt (pop-up).

 

It's a simple prompt like this one: http://devot-ee.com/...ogin_prompt.png

 

Trying to just read the page using cURL or file_get_contents_page() function sends back "You are not authorized to see this page" without login questions or anything related.

 

If anyone knows of a solution please help me out.

 

Thank you,

 

 

- ultimatum

Link to comment
Share on other sites

No, I'm not. If it was my site then I would just connect to the database. I'm parsing a website which I have a subscription to and parsing has been allowed to automate some steps in data analysis.

 

Are you talking about this CURLOPT_HTTPAUTH option?

 

If I get through the login, will curl pick up webpages with frames and will I be able to scrape information from them?

 

 

Thank you.

Link to comment
Share on other sites

CURLOPT_USERPWD

 

Frames are dealt with by the browser - cURL will only give you the HTML that defines the frame, not the contents of the page referenced.

 

In general you do this kind of work by logging in (and making sure cURL is saving the cookies someplace you can reuse in subsequent calls) and hitting the exact URLs you need.

Edited by requinix
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.