OK - it's easy enough to use PHP to grab the contents of an external web page, but I need to go a step further. I want to write a script that can post information to an external site, grab the HTML sent back by that site and then analyse the returned code. Basically my PHP script has to emulate a web browser posting information from a form.

Does anyone have any idea how I can do this? It's for - belive it or not - a practical joke (on a colleague so no legal implications there )