Just made this for another site.
PHP Code:
<?php
$pages = $_GET['pages'];
for($i = 0; $i <= $pages; $i++) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://hiscore.runescape.com/overall.ws?rank=' . ($i*22) . '&table=0&scroll=true&category_type=0');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$userlist = curl_exec($ch);
curl_close($ch);
preg_match_all('/hiscorepersonal.ws\?user1=(.*)\"/', $userlist, $arr, PREG_PATTERN_ORDER);
foreach($arr[1] as $key => $value) $usernames .= $value . "`r`n";
}
if ($usernames) {
$usernames_path = hash('crc32', 'usernames-rs' . time()) . '.txt';
echo '<a href="' . $username_path . '">Download usernames</a>';
$fh = fopen($usernames_path, 'w+'))
fwrite($fh, $usernames);
$fclose($fh);
}
?>
Example: /path/to/this/script.php?pages=5
Result: First 5 pages of usernames from the RS hiscores. They are then saved in a text file, which you can download.