Quote:
Originally posted by swedguy
PHP Code:
$content = implode('', file('http://www.domain.com/sup.txt'));
$fp = fopen("file.txt", "w");
if ($fp) {
fwrite($fp, $content);
fclose($fp);
}
A simple one. It will write http://www.domain.com/sup.txt to file.txt (owerwrite and truncate file.txt if it exist).
|
Juicy, you can also make it so it grabs it from a query string (EG: script.php?file=whatever.txt&url=http://www.wow.com/wtf.txt).
The code would be changed to:
PHP Code:
<?php
$content = implode('', file($_GET['url']));
$fp = fopen("".$_GET['file']."", "w");
if($fp)
fwrite($fp, $content);
fclose($fp);
But goodjob to everyone who participated as well

Goodluck