Code:
<?php
function curl_get_contents($link) {
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $link);
curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch,CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0');
$html = curl_exec($ch);
curl_close($ch);
return $html;
}
$rsn = $_GET['rsn'];
$url = "https://create.runescape.com/input_details.ws?username="; $url .= $rsn;
$data = curl_get_contents($url);
preg_match("/var last_ajax_response \= \'(.*)\'\;/", $data, $b);
if ($b[1] == 17) { echo "$rsn|Currently Available to Register\n"; }
else { $a = str_replace("'", "", $b[1]); $a = str_replace("18,", "", $a); $a = str_replace(",", ", ", $a); echo "$rsn|Taken or Unavailable.|$a\n"; }
exit;
?>
for those of you who dont have a curl enabled host here's the same code but with file_get_contents() instead.
i hate using sockets in php so no socket example

Code:
<?php
$rsn = $_GET['rsn'];
$url = "https://create.runescape.com/input_details.ws?username="; $url .= $rsn;
$data = file_get_contents($url);
preg_match("/var last_ajax_response \= \'(.*)\'\;/", $data, $b);
if ($b[1] == 17) { echo "$rsn|Currently Available to Register\n"; }
else { $a = str_replace("'", "", $b[1]); $a = str_replace("18,", "", $a); $a = str_replace(",", ", ", $a); echo "$rsn|Taken or Unavailable.|$a\n"; }
exit;
?>