I have medium level of PHP skill, and I was wondering if anybody has any opinions of the best way to just download a remote file to a php server. If for example someone passed a URL of "http://localhost/dl.php?www.anywhere.co ... oc.torrent" what would be the best way (in PHP) for the server to save that torrent file from the remote location to a local directory on the server.
Thanks in the advance for even reading this post!
== David
Download a remote file to a server
Moderator: General Moderators
e.g.
Code: Select all
$s = fopen($url, 'rb');
file_put_contents('localfile.name', $s);-
themasterofthedisaster
- Forum Commoner
- Posts: 31
- Joined: Mon Jul 09, 2007 6:23 am
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
-
themasterofthedisaster
- Forum Commoner
- Posts: 31
- Joined: Mon Jul 09, 2007 6:23 am
Lol, PHP P2P, sounds gretate. Here I have found some info: http://www.vclcomponents.com/PHP/File_M ... -info.html
Ill continue searching...
Ill continue searching...