Forum Moderators: coopster
copy.php content:
<?php
$handle = @fopen("url.txt", "r");
if ($handle)
{
while (!feof($handle))
{
$buffer = fgets($handle, 4096);
$filename=basename($buffer);
copy($buffer,$filename);
}
fclose($handle);
}
?>
url.txt content:
http://example.com/download/software/internet/Yahoo!_Messenger_Vista_10/example.com_Yahoo!_Messenger_Vista_interface.jpg
http://www.example.com/GoogleA4.com_Portable_Google_Chrome_2.0.156.1.rar
www.example.com/mehr4/magazine/mehr4-booltan5-web.pdf
sefidshahr.googlea4.com/yadegari/Y1.pdf
Error:
Warning: copy(www.example.com/mehr4/magazine/mehr4-booltan5-web.pdf ) [function.copy]: failed to open stream: No such file or directory in /home/fhlinux193/b/domain.com/user/htdocs/copy.php on line 9Warning: copy(sefidshahr.example.com/yadegari/Y1.pdf ) [function.copy]: failed to open stream: No such file or directory in /home/fhlinux193/b/domain.com/user/htdocs/copy.php on line 9
Warning: copy( ) [function.copy]: failed to open stream: No such file or directory in /home/fhlinux193/b/domain.com/user/htdocs/copy.php on line 9
_______________________________________________ [edited by: dreamcatcher at 8:01 pm (utc) on Feb. 16, 2009]
[edit reason] use example.com. Thanks. [/edit]
Warning: copy(www.example.com/mehr4/magazine/mehr4-booltan5-web.pdf ) [function.copy]: failed to open stream: No such file or directory in /home/fhlinux193/b/domain.com/user/htdocs/copy.php on line 9
Warning: copy(sefidshahr.example.com/yadegari/Y1.pdf ) [function.copy]: failed to open stream: No such file or directory in /home/fhlinux193/b/domain.com/user/htdocs/copy.php on line 9
These do not have an http:// preceding them, try adding the http:// to the last 2 URLs in the text file and try again
http://www.example.com/download/software/internet/Yahoo!_Messenger_Vista_10/example.com_Yahoo!_Messenger_Vista_interface.jpg
http://www.example.com/example.com_Portable_Google_Chrome_2.0.156.1.rar
http://www.example.com/mehr4/magazine/mehr4-booltan5-web.pdf
http://sefidshahr.example.com/yadegari/Y1.pdf
Warning: copy(http://sefidshahr.example.com/yadegari/Y1.pdf ) [function.copy]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/fhlinux193/b/example.com/user/htdocs/copy.php on line 9Warning: copy( ) [function.copy]: failed to open stream: No such file or directory in /home/fhlinux193/b/example.com/user/htdocs/copy.php on line 9
[edited by: eelixduppy at 6:33 pm (utc) on Feb. 17, 2009]
[edit reason] exemplified [/edit]
<?php
$_handle = @fopen("url.txt", "r");
if ($_handle)
{
while (!feof($_handle))
{
$_buffer = fgets($_handle, 4096);
$_filename = basename($_buffer);
if (copy($_buffer,$_filename))
{
echo "true : ";
echo $_filename;
echo "<br>";
}
}
fclose($_handle);
}
?>
true : example.com_Yahoo!_Messenger_Vista_interface.jpg
true : example.com_Portable_Google_Chrome_2.0.156.1.rar
true : mehr4-booltan5-web.pdf
true : Y1.pdf
http://example.com/download/software/internet/Yahoo!_Messenger_Vista_10/example.com_Yahoo!_Messenger_Vista_interface.jpg
http://example.com/example.com_Portable_Google_Chrome_2.0.156.1.rar
http://sefidshahr.example.com/yadegari/Y1.pdf
http://example.com/mehr4/magazine/mehr4-booltan5-web.pdf
true : example.com_Yahoo!_Messenger_Vista_interface.jpg
true : example.com_Portable_Google_Chrome_2.0.156.1.rar Warning: copy(http://sefidshahr.example.com/yadegari/Y1.pdf ) [function.copy]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/fhlinux193/b/backup.linkpress.ir/user/htdocs/copy.php on line 9
true : mehr4-booltan5-web.pdf
[edited by: eelixduppy at 6:34 pm (utc) on Feb. 17, 2009]
[edit reason] example.com [/edit]