#!/usr/bin/perl # Whois script use CGI qw(:standard escapeHTML); use Net::Whois::Raw qw( whois ); # Get values from form my $domain = param('domain'); # Check for blanks unless (param('domain')){noname('a domain')}; #Get whois information $whois = whois($domain); #Print whois information print "Content-type: text/html\n\n"; HEADER('Results'); print <<EOT; $whois EOT FOOTER(); exit; # We stop here # Header subroutine sub HEADER { my($title) = @_; print <<EOT; <HTML> <HEAD> <TITLE>$title</TITLE> </HEAD> <body bgcolor="#263C6D" text="white" link="#ffffff" vlink="#C0C0C0" al +ink="#C0C0C0"> EOT } # Noname Subroutine sub noname { my($reason) = $_[0]; print "Content-type: text/html\n\n"; HEADER('Blank Entry'); print <<EOF; <H1><center>Incomplete</H1></center> <center>Please fill in all required fields. You are missing $reaso +n</center> EOF FOOTER(); exit; #we Stop Here } # Footer Subroutine sub FOOTER { print <<EOT; </BODY> </HTML> EOT }
In reply to Net::Whois::Raw qw( whois ); by k0rn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |