I am trying to use file_get_contents to get the contents of a members-only webpage. Because the website is members-only, the contents of the webpage obviously changes for each user. Is there any way to give the server a cookie, so that it logs into the website before getting the contents? I will be posting to a form to login.
For example:
If I wanted to check my PMs on this website, I would need to login first to do so. How would I go about telling the server to login, and then get the contents of the private messages HTML output? Without doing this, the file_get_contents function (Or whichever function used) would just return the "Please login" message, instead of the list of messages.
file_get_contents cookie?
Moderator: General Moderators
-
Pyro In A Cage
- Forum Newbie
- Posts: 10
- Joined: Mon Jul 17, 2006 4:27 pm
-
Pyro In A Cage
- Forum Newbie
- Posts: 10
- Joined: Mon Jul 17, 2006 4:27 pm
-
Pyro In A Cage
- Forum Newbie
- Posts: 10
- Joined: Mon Jul 17, 2006 4:27 pm
If I wanted legal advice, I would not have come to a programming forum. Do you contact your ISP every time you check your E-Mail with a third-party E-Mail client such as outlook or thunderbird? Do you contact google everytime you view their website with firefox or internet explorer? How about asking permission from your webhost before you use FlashFXP or WS_FTP to upload your files? I very highly doubt that you would answer yes to any of those questions. So why would I ask permission to write a client to ease access of information which I access on a daily basis?
What I am writing is simply a proxy, and it does not record or publish the information.
Back on topic: Will aos24, or any other helpful member here please give me an example of using CURL? I have tried to figure it out, but am having a very hard time. I would very much appreciate an example.
What I am writing is simply a proxy, and it does not record or publish the information.
Back on topic: Will aos24, or any other helpful member here please give me an example of using CURL? I have tried to figure it out, but am having a very hard time. I would very much appreciate an example.
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Had you said this I would not have commented. We have to cover our own rears when users ask for such things because they can be illegal.Pyro In A Cage wrote:What I am writing is simply a proxy, and it does not record or publish the information.
As for examples of cURL, there are many floating around. The major ones you will require are for the options governing cookies and posting.
Snoopy may be of interest too.
-
Pyro In A Cage
- Forum Newbie
- Posts: 10
- Joined: Mon Jul 17, 2006 4:27 pm
-
Pyro In A Cage
- Forum Newbie
- Posts: 10
- Joined: Mon Jul 17, 2006 4:27 pm