Skip to content

Instantly share code, notes, and snippets.

@flavius
Forked from anonymous/myscritp.php
Created January 26, 2013 00:18
Show Gist options
  • Save flavius/4639093 to your computer and use it in GitHub Desktop.
Save flavius/4639093 to your computer and use it in GitHub Desktop.
<?php
$url = 'http://forum.antichat.ru/thread20301.html';
function getfile($url,$num) {
echo "$url";
$content = file_get_contents($url);
echo nl2br($content);
$fp = fopen($num.".txt", 'write');
fwrite($fp, nl2br($content));
fclose($fp);
return $content;
}
$lines = file('links.txt');
foreach ($lines as $line_num => $line) {
//De bug echo "url:<b>{$line_num}</b> : " . htmlspecialchars($line) . "<br />\n";
getfile($url,$line_num);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment