
November 2nd, 2012, 04:34 AM
|
|
Registered User
|
|
Join Date: Nov 2012
Posts: 1
Time spent in forums: 1 h 10 m 7 sec
Reputation Power: 0
|
|
|
PHP-General - Url upload
hi
i want to upload a file to my server from a url
i searched and i found this code:
PHP Code:
<?php
define('BUFSIZ', 4095);
$url = '(type url here);
$rfile = fopen($url, 'r');
$lfile = fopen(basename($url), 'w');
while(!feof($rfile))
fwrite($lfile, fread($rfile, BUFSIZ), BUFSIZ);
fclose($rfile);
fclose($lfile);
?>
my problem is that the url is from a file sharing site that have user and password for download
how can i put user and pass to downalod in this code?
|