#!/usr/bin/perl sub head { # <- Do not touch this or the next line! print qq~ Lowe And Behold Webhosting - E-mail Contact LoweAndBehold Web Hosting Domain Look-up
Help FAQ
Email Support
Sitemap

 
Virtual
Dedicated

 
Search For Domain
Adult Site Design
E-Commerce

 
Why LoweAndBehold
Choosing A Host
Contact Info

 

~; # <- Do not touch this! } sub foot { # <- Do not touch this or the next line! print qq~
~; } # <- Do not touch this! # This is the colour of the head and foot tables $tableColour = '#1E70C3'; # This is the colour of the text in the table head and foot $tableTextColour = '#FFFFFF'; # This is the colour of the table head and foot border # Must be in RGB format. $tableBorder = '100,0,0'; # This is the domain search box colour. Must be in RGB format $searchColour = '204,0,0'; # This is the background colour of the search button $buttonBgrnd = '#1E70C3'; # This is the search button text colour $buttonText = '#FFFFFF'; # This should be self explanitory! $show_COM = 'y'; $show_NET = 'y'; $show_ORG = 'y'; $show_INFO = 'y'; $show_BIZ = 'y'; $show_COUK = 'n'; $show_ORGUK = 'n'; if ($show_COM eq "y") { $com = " .com "; } if ($show_NET eq "y") { $net = " .net "; } if ($show_ORG eq "y") { $org = " .org "; } if ($show_INFO eq "y") { $info = " .info "; } if ($show_BIZ eq "y") { $biz = " .biz "; } if ($show_COUK eq "y") { $couk = " .co.uk "; } if ($show_ORGUK eq "y") { $orguk = " .org.uk"; } use IO::Socket; &parse; my $action = $form{'action'}; my $dom = "\L$form{'dom'}"; my $whois_server = $form{'dispWhois'}; print "Content-type: text/html\n\n"; &head; print qq~
LOWEANDBEHOLD WHOIS DOMAIN SEARCH
~; if (!$action) { print qq~
Query A Domain

Enter a domain to search for in the field below. You can search any or all of the extensions by selecting/deselecting the checkboxes.

WWW.

Choose your extension 
$com $net $org $info $biz $couk $orguk

~; } if ($action eq 'search') { print "
Query Results

Thankyou for using our domain search. We have pleasure in presenting you with the results below. Search Again.

\n"; foreach $tld (@tlds) { if ($tld =~ /.uk/) { $whois_server = "whois.nic.uk"; } elsif ($tld =~ /uk./) { $whois_server = "whois.nomination.net"; } elsif ($tld =~ /info/) { $whois_server = "whois.afilias.net"; } elsif ($tld =~ /biz/) { $whois_server = "whois.nic.biz"; } else { $whois_server = "whois.crsnic.net"; } $flag = ''; &whois; foreach $line (@out) { if ($line =~ /No match for/ || $line =~ /NOT FOUND/ || $line =~ /Not found/) { $flag++ } if ($line =~ /Whois Server/) { chomp $line; ($junk,$USwhois) = split(/\: /,$line); } } if ($USwhois) { $dispWhois = "\L$USwhois"; $USwhois = ''; } else { $dispWhois = $whois_server; } if ($flag) { print "$dom.$tld may be Get It Now

\n"; } else { print qq~ $dom.$tld is not available View Whois

\n~; } } print "

\n"; } if ($action eq 'display') { $tld = $form{'ext'}; if (&whois) { print qq~
This is the raw whois output provided by $whois_server for the domain: $dom.$tld Search Again

@out
~; } else { print "ERROR - Whois server $whois_server not working!\n"; } } # End action display. sub whois { $socket = IO::Socket::INET->new(Proto=>"tcp", PeerAddr=>"$whois_server",PeerPort=>'43',); if ($socket) { print $socket "$dom" . ".$tld" . "\015\012"; @out = <$socket>; close $socket; } } sub parse { my($in, @in, $entry, $var, $val); $in = $ENV{'QUERY_STRING'}; @in = split(/\&/, $in); foreach $entry (@in) { $entry =~ s/\+/ /g; ($var, $val) = split(/=/, $entry, 2); $var =~ s/%([A-Fa-f0-9]{2})/pack("c",hex($1))/ge; $val =~ s/%([A-Fa-f0-9]{2})/pack("c",hex($1))/ge; $form{$var} = $val; if ($var eq 'tld') { $tlds .= "$val:"; } } @tlds = split(/\:/,$tlds); } print qq~
© Copyright LoweAndBehold.com 2002
~; &foot;