|
#!/usr/local/bin/perl
print "Expires: Thu, 04 Oct 2000 00:00:00 GMT\n";
print "Content-Type: text/javascript; Charset=euc-jp\n";
print "\n";
$QUERY_STRING = $ENV{'QUERY_STRING'};
@Fields_Data2 = split(/&/, $QUERY_STRING);
foreach $Field_Data2 ( @Fields_Data2 ) {
($Name, $Value) = split(/=/, $Field_Data2);
$Value =~ tr/+/ /;
$Value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$_GET{$Name} = $Value;
}
$domin = $_GET{'domain'};
$title = $_GET{'title'};
print <<VIEW;
var cset;
if (window.navigator.userAgent.toLowerCase().indexOf("msie") > -1) {
cset = document.charset;
}
else if (window.navigator.userAgent.toLowerCase().indexOf("firefox") > -1) {
cset = document.characterSet;
}
else if (window.navigator.userAgent.toLowerCase().indexOf("opera") > -1) {
cset = document.charset;
}
else if (window.navigator.userAgent.toLowerCase().indexOf("netscape") > -1) {
cset = document.characterSet;
}
str='';
str+="<form target=\\"_blank\\" method=get action=\\"http://www.google.co.jp/search\\"> ";
str+="\\n<table bgcolor=\\"#FFFFFF\\"><tr valign=top><td> ";
str+="\\n<a href=\\"http://www.google.co.jp/\\"> ";
str+="\\n<img src=\\"http://www.google.com/logos/Logo_40wht.gif\\" ";
str+=" \\nborder=\\"0\\" alt=\\"Google\\" align=\\"absmiddle\\"></a> ";
str+="\\n</td> \\n<td> \\n<input type=text ";
str+="name=q size=31 maxlength=255 value=\\"\\"> \\n<input ";
str+="type=hidden name=ie value=" + cset + "> \\n<input ";
str+="type=hidden name=oe value=" + cset + "> \\n<input ";
str+="type=hidden name=hl value=\\"ja\\"> \\n<input ";
str+="type=submit name=btnG value=\\"Google 検索\\"> ";
str+="\\n<font size=-1> \\n<input type=hidden ";
str+="name=domains value=\\"$domin\\"><br> ";
str+="\\n<input type=radio name=sitesearch value=\\"\\"> ";
str+="WWW を検索 \\n<input type=radio name=sitesearch ";
str+="value=\\"$domin\\" checked> $title ";
str+="を検索 \\n</font> \\n</td></tr></table> ";
str+="\\n</form> \\n ";
document.write( str );
VIEW
| |