A php script on server A that periodically take a web page on server B and parse it

hi all

I want to write a module in php that reside on server A and every day download a webpage from server B using login and password.
It parses this page and produce a new html page that contains the differences
beetween the page on server B of yesterday and today

My questions:
using php is it possible to do so?
are there better, simpler approach?

how is possible automate the requests?

thanks all

Paolo

You use crontab program (linux / unix) to schedule a task to be executed at certain time intervals (in this case, task would be invoking a php script).

Then you’re left with writing the code of that script that takes care of logging in to the site B and fetching the data you need (hint: cURL) and finding out what diff algorithm you want to use to get the differences between the two pages you want to compare (hint - wikipedia + LCS if you want full php solution).

thanks for the clear answer
my hosting seems that doesn’t have cron

but this solution may be viable

http://drupal.org/project/poormanscron

regards