Jump to content

Download from remote server


PhpLogLick

Recommended Posts

hey

 

i need help about remote download from another host to mine

<?php 
$file = http://file.com
$path = home/user/public_html/
$frw = fopen($file, "r"); 
$fwr = fopen($path . basename($file), "w"); 
while(!feof($file)) fwrite($frw, fread($frw, 1), 1); 
fclose($readf); 
fclose($fwr); 
?>

 

but it seems that doesnt work,any help please?

Link to comment
https://forums.phpfreaks.com/topic/118460-download-from-remote-server/
Share on other sites

<?php 
$file = ftp://user:[email protected]/lol.com
$path = home/user/public_html/
$frw = fopen($file, "r"); 
$fwr = fopen($path . basename($file), "w"); 
while(!feof($file)) fwrite($frw, fread($frw, 1), 1); 
fclose($readf); 
fclose($fwr); 
?>

like this? please help to fix

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.