#!C:/Perl/bin/perl.exe #Fetch the contents of the fellow Url,Only for Three Level #Power By:antsnet #Email:antsnet@163.com
print "Content-type: text/html;charset=gb2312;/n/n"; use LWP 5.64; # 载入较新版本的 LWP classes use CGI; my $cgi=new CGI; my $browser = LWP::UserAgent->new; my $count=0;
#start function of getUrl sub getUrl{ my $myurl=shift;
# $content 里是网页内容,下面是对此内容作些分析: getAnalyse(getContents($myurl),$myurl); foreach $url(@hash_title){ print $url."/n"; } } #end of function of getUrl #start of get robots.txt sub getRobots{ print getContents(); } #end of get robots.txt #<![start function of getContents; sub getContents{ my $myurl=shift;