in reply to Help with curl...

I think you'll find WWW::Mechanize does everything you need. I don't personally know any php or the curl commands it uses.

-Paul