login to other site by sending post variables
Posted on
16th Feb 2014 07:03 pm by
admin
hey,
here is my problem: my school gave me a mail account for school-stuff use. they mail us importent information like changes to the timetable. now this stupid mail account oanly has a web interface. no imap or pop3/smtp. (and it's not looking like that is going to change soon)
i am trying to make a script that logs in to the page an than screen-scrapes the web interface so and then just formats it as an rss feed or something so my feedreader can notifig me if i have a mail.
the login page of the webmail is a php page and it uses POST to send the login data to the next page. is also sets a cookie that i wil need to acces the next page.
i found a methed HttpRequest::send ( void ) on the php.net manual but i don't get how it works and how i can acces the data it returns, can you help me with this.
and secondly normaly i can get the data form the page by using $data = file_get_contents($url); or loadHTMLFile($url); but it might not work becouse it wel need the cookie... is thare a way i can do this?
thanks in advance,