To use Nominet whois2 you first have to inform them your server IP address and be granted access. Usage is simple by downloading whois.php. If your host sends to wrong IP, look at the whois2 bind snippet.
http://www.localhost.com/whois.php?domain=dailydomain.co.uk
<?php
$whois = 'whois.nic.uk';
$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
$ip = $_SERVER["REMOTE_ADDR"];
$domain = $_GET["domain"]; // domain to query
$fs = fsockopen("$whois", 1043, $errno, $errstr, 60);
if (!$fs) {
fclose($fs);
} else {
fputs($fs, "$hostname $ip $domain\r\n");
$line = stream_get_contents($fs);
fclose($fs);
echo str_replace("\n", '<br />', $line);
?>