#!/usr/local/bin/perl require '/httpd/cgi-bin/headfoot.pl'; if ($ENV{'SERVER_PORT'} eq "443") { print "Location: http://www.flash.net/~domain/tools\n\n"; } use Fcntl; use DB_File; $domain = "thcproductions\.com"; &get_info; ######################################################################## sub print_header { print "Content-type: text/html \n\n"; print "$header"; } ######################################################################## sub get_info { &print_header; print <<_EOF_;

$domain


_EOF_ $db_file = "/home/httpd/conf/domains.db"; $db_obj = tie(%data, 'DB_File', $db_file, O_RDONLY, 0444) or print $!; if (!$data{$domain}) { print "

It is not in the httpd.conf

"; } else { $h = $domain; ($rootdir,$serveraliases,$logging) = split(/\|\|/,$data{$h}); $username = (split('\/',$rootdir))[4]; $serveralias = (split(' ',$serveraliases))[0]; if ($h =~ /\d+\.\d+\.\d+\.\d+/) { $host = $serveralias; } else { $host = $h; } print ""; print "
VirtualHost $h
SeverAdmin $username
"; if (! $rootdir) { print "Sorry, that domain is not hosted by FlashNet Communications\n\n"; } } undef $db_obj; untie(%data); print ""; print "$footer"; exit; }