还有这样的在外国网站直接下的:
mail_search.html:
<FORM METHOD="GET" ACTION="A:\任务\websearch\web-search.cgi"><CENTER><HR WIDTH=70%>
<HR WIDTH=50%>
<HR WIDTH=30%>
<IMG SRC="search-logo.gif">
<TABLE BORDER=4 CELLSPACING=0 CELLPADDING=8 WIDTH="250" BGCOLOR="#000000" bordercolor="#BC6903" bordercolorlight="#F8AE41" bordercolordark="#BC6903" >
<TR>
<TD>
<CENTER><B><FONT COLOR="#E8BE79">
Enter Your Key-Words <Input Type="text" Name="query" Size="30">
</TD>
</TR>
<TR>
<TH>
<FONT COLOR="#E8BE79">Select A Database to Search
<BR>
<SELECT NAME="site">
<OPTION VALUE="altavista"> Alta Vista
<OPTION VALUE="excite">Excite
<OPTION VALUE="infoseek">Infoseek
<OPTION VALUE="lycos">Lycos
<OPTION VALUE="yahoo">Yahoo
<OPTION VALUE="webcrawler">Webcrawler
</SELECT>
<Input Type="Image" Src="search.gif" Value="submit" BORDER=0 ALIGN=absmiddle>
</TH>
</TR>
</TABLE>
</CENTER>web-search.cgi#!/usr/bin/perl ### *** IMPORTANT *** ### ### *** Make sure the path to PERL above is correct *** ### ###########################################################
# RLAJ.COM Search The Web #
# Script name - web-search.cgi #
# Written by Ranson Johnson - Email [email protected] #
# Version 1.0 #
########################################################### ### *** IMPORTANT *** ###### *** If FTP'ing this file, be sure to send in ASCII format *** ###
# This is a very simple to set-up program for searching the web. There is one
# cgi script that does all the work. No configuration of the script is
# necessary. Just place the script anywhere on your site that you can run
# cgi's and chmod the web-search.cgi to 775 to make it executable by the
# server.# In the main-search.htm change the FORM tag to point to your
# web-search.cgi. # EXAMPLE: <FORM METHOD="POST" ACTION="/cgi-bin/web-search.cgi"> ### *** DO NOT CHANGE ANYTHING BELOW *** ###&parse;$FORM{'query'} =~ s/\s/\%20/g;if ($FORM{'site'} eq 'altavista') {print "Location: http://www.altavista.digital.com/cgi-bin/query\?pg=q\&what=web\&kl=XX\&q=$FORM{'query'}\n\n";}if ($FORM{'site'} eq 'excite') {print "Location: http://www.excite.com/search.gw?trace=a&search=$FORM{'query'}\n\n";}if ($FORM{'site'} eq 'infoseek') {print "Location: http://www2.infoseek.com/Titles?qt=$FORM{'query'}&col=WW&sv=IS&lk=noframes&nh=10\n\n";}if ($FORM{'site'} eq 'lycos') {print "Location: http://www.lycos.com/cgi-bin/pursuit?query=$FORM{'query'}&matchmode=and&cat=lycos\n\n";}if ($FORM{'site'} eq 'yahoo') {print "Location: http://search.yahoo.com/bin/search?p=$FORM{'query'}\n\n";}if ($FORM{'site'} eq 'webcrawler') {print "Location: http://webcrawler.com/cgi-bin/WebQuery?mode=compact&maxHits=25&searchText=$FORM{'query'}\n\n";}exit;sub parse { local (*FORM) = @_ if @_;
local ($i, $key, $val); # Read in text
if (&LocalMethGet)
{
$FORM = $ENV{'QUERY_STRING'};
}
elsif (&LocalMethPost)
{
read(STDIN,$FORM,$ENV{'CONTENT_LENGTH'});
} @FORM = split(/[&;]/,$FORM); foreach $i (0 .. $#FORM)
{
# Convert plusses to spaces
$FORM[$i] =~ s/\+/ /g; # Split into key and value
# splits on the first =
($key, $val) = split(/=/,$FORM[$i],2); # Convert %XX from hex numbers to alphanumeric
$key =~ s/%(..)/pack("c",hex($1))/ge;
$val =~ s/%(..)/pack("c",hex($1))/ge; # Associate key and value
# \0 is the multiple separator
$FORM{$key} .= "\0" if (defined($FORM{$key}));
$FORM{$key} .= $val;
}
return scalar(@FORM);
} # End sub parse
sub LocalMethGet
# from Steven Brenner's cgi-lib.pl v1.14
# true if this cgi call was using the GET request, false otherwise
{
return ($ENV{'REQUEST_METHOD'} eq "GET");
}sub LocalMethPost
# from Steven Brenner's cgi-lib.pl v1.14
# true if this cgi call was using the POST request, false otherwise
{
return ($ENV{'REQUEST_METHOD'} eq "POST");
}
这样程序是不是要传到网上才行,他们的模拟服务器是怎么配置的?(象PWS IIS5)等,???/
你们可以考取试一下,怎么才行,我忽视了那方面问题!!!!
mail_search.html:
<FORM METHOD="GET" ACTION="A:\任务\websearch\web-search.cgi"><CENTER><HR WIDTH=70%>
<HR WIDTH=50%>
<HR WIDTH=30%>
<IMG SRC="search-logo.gif">
<TABLE BORDER=4 CELLSPACING=0 CELLPADDING=8 WIDTH="250" BGCOLOR="#000000" bordercolor="#BC6903" bordercolorlight="#F8AE41" bordercolordark="#BC6903" >
<TR>
<TD>
<CENTER><B><FONT COLOR="#E8BE79">
Enter Your Key-Words <Input Type="text" Name="query" Size="30">
</TD>
</TR>
<TR>
<TH>
<FONT COLOR="#E8BE79">Select A Database to Search
<BR>
<SELECT NAME="site">
<OPTION VALUE="altavista"> Alta Vista
<OPTION VALUE="excite">Excite
<OPTION VALUE="infoseek">Infoseek
<OPTION VALUE="lycos">Lycos
<OPTION VALUE="yahoo">Yahoo
<OPTION VALUE="webcrawler">Webcrawler
</SELECT>
<Input Type="Image" Src="search.gif" Value="submit" BORDER=0 ALIGN=absmiddle>
</TH>
</TR>
</TABLE>
</CENTER>web-search.cgi#!/usr/bin/perl ### *** IMPORTANT *** ### ### *** Make sure the path to PERL above is correct *** ### ###########################################################
# RLAJ.COM Search The Web #
# Script name - web-search.cgi #
# Written by Ranson Johnson - Email [email protected] #
# Version 1.0 #
########################################################### ### *** IMPORTANT *** ###### *** If FTP'ing this file, be sure to send in ASCII format *** ###
# This is a very simple to set-up program for searching the web. There is one
# cgi script that does all the work. No configuration of the script is
# necessary. Just place the script anywhere on your site that you can run
# cgi's and chmod the web-search.cgi to 775 to make it executable by the
# server.# In the main-search.htm change the FORM tag to point to your
# web-search.cgi. # EXAMPLE: <FORM METHOD="POST" ACTION="/cgi-bin/web-search.cgi"> ### *** DO NOT CHANGE ANYTHING BELOW *** ###&parse;$FORM{'query'} =~ s/\s/\%20/g;if ($FORM{'site'} eq 'altavista') {print "Location: http://www.altavista.digital.com/cgi-bin/query\?pg=q\&what=web\&kl=XX\&q=$FORM{'query'}\n\n";}if ($FORM{'site'} eq 'excite') {print "Location: http://www.excite.com/search.gw?trace=a&search=$FORM{'query'}\n\n";}if ($FORM{'site'} eq 'infoseek') {print "Location: http://www2.infoseek.com/Titles?qt=$FORM{'query'}&col=WW&sv=IS&lk=noframes&nh=10\n\n";}if ($FORM{'site'} eq 'lycos') {print "Location: http://www.lycos.com/cgi-bin/pursuit?query=$FORM{'query'}&matchmode=and&cat=lycos\n\n";}if ($FORM{'site'} eq 'yahoo') {print "Location: http://search.yahoo.com/bin/search?p=$FORM{'query'}\n\n";}if ($FORM{'site'} eq 'webcrawler') {print "Location: http://webcrawler.com/cgi-bin/WebQuery?mode=compact&maxHits=25&searchText=$FORM{'query'}\n\n";}exit;sub parse { local (*FORM) = @_ if @_;
local ($i, $key, $val); # Read in text
if (&LocalMethGet)
{
$FORM = $ENV{'QUERY_STRING'};
}
elsif (&LocalMethPost)
{
read(STDIN,$FORM,$ENV{'CONTENT_LENGTH'});
} @FORM = split(/[&;]/,$FORM); foreach $i (0 .. $#FORM)
{
# Convert plusses to spaces
$FORM[$i] =~ s/\+/ /g; # Split into key and value
# splits on the first =
($key, $val) = split(/=/,$FORM[$i],2); # Convert %XX from hex numbers to alphanumeric
$key =~ s/%(..)/pack("c",hex($1))/ge;
$val =~ s/%(..)/pack("c",hex($1))/ge; # Associate key and value
# \0 is the multiple separator
$FORM{$key} .= "\0" if (defined($FORM{$key}));
$FORM{$key} .= $val;
}
return scalar(@FORM);
} # End sub parse
sub LocalMethGet
# from Steven Brenner's cgi-lib.pl v1.14
# true if this cgi call was using the GET request, false otherwise
{
return ($ENV{'REQUEST_METHOD'} eq "GET");
}sub LocalMethPost
# from Steven Brenner's cgi-lib.pl v1.14
# true if this cgi call was using the POST request, false otherwise
{
return ($ENV{'REQUEST_METHOD'} eq "POST");
}
这样程序是不是要传到网上才行,他们的模拟服务器是怎么配置的?(象PWS IIS5)等,???/
你们可以考取试一下,怎么才行,我忽视了那方面问题!!!!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货