Parašė Peacemaker· 2009 Lie. 17 14:07:26
#11
Turėtum gauti visus whois įrašus:
<form>
Domeno ip: <input type=text name=ip><br>
<input type=submit>
</form>
<br>
<?
function callback($buffer) {
return (ereg_replace("\n", "<br>", $buffer));
}
$ip=$_GET['ip'];
ob_start("callback");
if($ip) passthru("whois $ip");
ob_end_flush();
?>
Kitas metodas su socket'ais:
<?
$fp = fsockopen ("whois.serveriai.lt", 43);
if ($fp) {
fwrite($fp, "domenas.com\n");
while (!feof($fp)) {
print fread($fp,256);
}
fclose ($fp);
} else {
print"Klaida\n";
}
?>
Redagavo Peacemaker· 2009 Lie. 17 14:07:40