![]() |
Open Password protected web pages.
I need to open and read a web page in PHP (I can do that bit already)
The problem is to open the page you need to fill in the login page, which in turn creates a cookie, which is then passed when open the second page. At the moment I'm looking at the cookies in firefox, and putting these values into my code to get the system to work, however this isn't really a long term solution, as the cookies only last a couple of hours. Anybody any ideas how I can do this. (I do have a legitimate username and password for the site) |
Re: Open Password protected web pages.
You can set the cookies to last longer. setcookie() documentation
[edit:] sorry, misunderstood your problem |
Re: Open Password protected web pages.
Try looking into CURL. It is a library for PHP that allows you to communicate with other servers across the HTTP protocol. Without looking at the docs, I am guessing that it will have support for logging in and cookie manipulation.
|
Re: Open Password protected web pages.
From what I figure out, the first page uses a post to login and generate the cookie, the secondpage is the data I want.
I'm struggling getting my head round some of the Curl stuff, can anybody point me to any examples that open an ASP Session using this method? |
| All times are GMT -5. The time now is 9:13 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC