Page 1 of 1
whois script help
Posted: Tue Aug 19, 2003 3:52 pm
by skullnls
im reconfiguring a php whois script to display the whois info of about 300,00 domains and i need some help.
Here is the code that will basiclly make the script work. were flohost.com is were i need it to call a .txt and display the results from all the domains in the .txt
<?
include("Whois.php");
$whois = new Whois();
echo $whois->lookup("flohost.com");<-----were .txt syntax cmd would be
echo "<HR>";
?>
can anyone help me with this...??
Posted: Tue Aug 19, 2003 7:37 pm
by patrikG
This might help:
user notes PHP manual function fsockopen() wrote:This example queries Network Solutions whois database:
Code: Select all
$domain = "arifbudiman.net";
if (trim($domain) <> "") {
$domain = trim($domain);
$fp = fsockopen("whois.networksolutions.com", 43, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)";
} else {
fputs($fp, "$domain\r\n");
print "<pre>\r\n";
while (!feof($fp)) {
echo fread($fp,128);
}
print "</pre>";
fclose ($fp);
}
}
Regarding the fsockopen()
Posted: Fri Mar 12, 2004 8:44 am
by akistp
I'm trying to make this work for .gr name registration....
Unfortunately the hostamaster here does not provide a whois server (for some reason unknown!!)
Still there is a webwhois interface at the url below
https://grweb.ics.forth.gr/english/webwhois_for_gr.htm
that submits to
https://grweb.ics.forth.gr/servlet/gr.h ... PTIONS=All
So what i want is to fsockopen the url response and to try to parse it and check to what is the response.... If the response is that the domain "Exists..." then, display a domain unavailable message and if the response is that the domain "not Exists..." then a domain available message....
Can the above function be modified?? I guest the fisrt thing to get rid off is the port 43...change that to 80....What else??? Can anyone help me on this!!
Thank you all in advance!