Question

<?php
require("whoisClass.php")
$whois=new Whois;
$rs=$whois->whoislookup("99webtools.com"); //Your domain or IP
echo '<pre>'.$rs.'</pre>';
?>

and this is link to show whoisclass.php

http://99webtools.com/php-whois-script.php

Was it helpful?

Solution

The script has an error which you also have (copied and pasted from source), being the missing semi-colon at the end of:

require("whoisClass.php")
                         ^ // <= right there

replace with:

require("whoisClass.php");

and it will run.

Having error reporting on, would have signaled the following error:

Parse error: syntax error, unexpected '$whois' (T_VARIABLE) in /user/home/whois.php on line 3

Always use error reporting:

error_reporting(E_ALL);
ini_set('display_errors', 1);

Footnotes:

When an error is reported on a certain line number, many times the error is on the line before that. In this case it signals being on line 3, yet it's actually on line 2.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top