PHP site scraper with secure login

I am trying to clear the number of items that one of my distributors has per item. They do not know how to export this data. So I wonder if anyone can help me point out the right direction on how to clean up the site using PHP, which you need to log in to get the data? This is not a secure site with SSL.

Thanks for any advice.

Chris Edwards

+5
source share
2 answers

The easiest way to get what you need is cURL . The main function of cURL is that it allows you to configure an HTTP request that is configured as you need and get a response. This can be done in varying degrees of detail, depending on your needs.

What you want to do is basically make an HTTP request to get the page you need and clear the data from the HTML response. It can be very easy to do, but in your case you need to overcome some obstacles.

I assume that by saying "you need to log in," you mean the login form that you must go through before you can jump off anything. cURL can fake login with a little help on your part.

, "" cURL , . , , HTTP-, , cURL. HTTP-, Firebug, Chrome - Fiddler.

, cookie, . cookie HTTP- ( Set-Cookie). cookie Cookie - , , , ** ยน **.

, , , . , URL-, , , "", - URL-, . , : "", , , "", .

, cURL, , , , .


ยน ( , ) - , cookie . , cURL; , - .

+12

, curl,

script , cookie/ , , , , .. . .

, ,

http://devzone.zend.com/article/1081

+1

All Articles