Using php curl to automate website. [duplicate]
Possible Duplicate:
Is there a PHP equivalent of Perl's WWW::Mechanize?
Anyway to do this with curl php?
import mechanize
br=mechanize.Browser()
br.open('https://www.google.com/calendar/exporticalzip')
br.select_form(nr=0)
br['Email']='Username@gmail.com'
br['Passwd']='Password'
br.submit()
br.retrieve('https://www.google.com/calendar/exporticalzip','exportical.zip')
Read Using cURL to interact with Google Data services.
Refer to PHP Curl with Google Calendar and Class: Google Calendar Wrapper.
There is an excellent PHP class which emulates web browsers much like curl does called Snoopy.
It allows a lot of extra functionality like extracting links from a fetched page and extracting form elements which might be quite useful in your case.
精彩评论