![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Aug 2005
Posts: 19
Rep Power: 0
![]() |
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) |
|
|
|
|
|
#2 |
|
Battle Programmer
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 748
Rep Power: 3
![]() |
Re: Open Password protected web pages.
You can set the cookies to last longer. setcookie() documentation
[edit:] sorry, misunderstood your problem
__________________
<insert disclaimer here> <insert shameless plug for Visual Studio here> Last edited by Jimbo; Apr 3rd, 2008 at 9:13 PM. |
|
|
|
|
|
#3 |
|
Programming Guru
![]() Join Date: Apr 2005
Posts: 1,799
Rep Power: 5
![]() |
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.
|
|
|
|
|
|
#4 |
|
Newbie
Join Date: Aug 2005
Posts: 19
Rep Power: 0
![]() |
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? |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| can't open php pages | BlackSmith | PHP | 7 | Aug 22nd, 2006 4:07 PM |
| [Python] Password Generator | bulio | Show Off Your Open Source Projects | 2 | Feb 28th, 2006 3:01 AM |
| password box | ragenuub | Visual Basic | 5 | Nov 15th, 2005 3:46 PM |
| Just a small password generator | Jessehk | Show Off Your Open Source Projects | 3 | Sep 16th, 2005 8:41 AM |