Hey Guys,
I think I can solve your problem.
You can use the CURL library, that is not basically part of an average system, but is easily installable.
Once you've found the CURL pages -sorry, I don't know where they are, but as far as I can remember on some Swedish site ?!?... - and installed the library, you can use PHP's CURL handling functions.
It can completely fulfill your recommendations. Can handle HTTPS, HTTP, FTP and some more kind of protocols.
If you wanna know more, of I were not clean enough, contact me via mail.
Best
Paul