Download file from remote source using php (codes for both direct connection to internet and that through proxy server are written) !! Cheers !!
Read this post on webdevfunda.blogspot.com