<html>
<head>
<title>网站代理访问工具</title>
<style type="text/css">
<!--
.unnamed1 ...{
padding: 1pt;
border: 1pt dotted #ffffff;
}
body ...{
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
body,td,th ...{
font-family: 宋体;
font-size: 12px;
}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<body link="#000000" vlink="#000000" alink="#000000" leftmargin="0" topmargin="0" >
<div style="background:#FFFF66">
<form name="form1" method="post" action="1.asp">
<p><strong>请输入您要使用代理访问的网页:</strong>
<% if request.form("a")="" then%>
<input name="a" type="text" class="unnamed1" id="a" value="http://">
<%else%>
<input name="a" type="text" class="unnamed1" id="a" value="<% =request.form("a") %>">
<%end if%>
<label>
<select name="yy" class="input">
<option value="gb2312" selected>简体中文</option>
<option value="big5">繁体中文</option>
<option value="Shift-jIS">日文</option>
<option value="UTF-8">UTF-8</option>
<option value="windows">西欧默认</option>
<option value="ISO">西欧Iso</option>
</select>
</label>
<input name="Submit" type="submit" class="unnamed1" value="提交">
原创<font color="#990000" size="-1"> <a href="http://www.520hacker.com">520hacker</a> </font>修改<font color="#990000" size="-1"><a href="http://www.uiokyu.com">ts</a></font></p>
</form>
</div>
<%
if request.form("a")<>"" or request("a")<>"" then
'获得网页
Function getHTTPPage(url)
dim http
set http=Server.createobject("Microsoft.XMLHTTP")
Http.open "GET",url,false
Http.send()
On Error Resume Next
If Http.Status<>200 then
exit function
end if
getHTTPPage=bytesToBSTR(Http.responseBody,request.form("yy"))
set http=nothing
if err.number<>0 then err.Clear
End function
'过滤01
Function BytesToBstr(body,Cset)
dim objstream
set objstream = Server.CreateObject("adodb.stream")
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = Cset
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
'重要替换
Function Newstring(wstr,strng)
Newstring=Instr(wstr,strng)
End Function
'下面轮到我发神经了~
wstr=getHTTPPage( request.form("a") )
if int(len(wstr))>1000 then
start=newstring(wstr,"")
over=newstring(wstr,"")
'wstr=replace(wstr,"src=""/","src=""")
response.write wstr
else
response.write "错鸟,要么是太多的字鸟,为了节省资源被End了,要么是您要访问的资源有问题"
'response.write len(wstr)
end if%>
<div style="background:#FFFF66">
<form name="form1" method="post" action="tmp.asp">
<p><strong>请输入您要使用代理访问的网页:</strong>
<input name="a" type="text" class="unnamed1" id="a" value="<% =request.form("a") %>">
<label>
<select name="yy" class="input">
<option value="gb2312" selected>简体中文</option>
<option value="big5">繁体中文</option>
<option value="Shift-jIS">日文</option>
<option value="UTF-8">UTF-8</option>
<option value="windows">西欧默认</option>
<option value="ISO">西欧Iso</option>
</select>
</label>
<input name="Submit" type="submit" class="unnamed1" value="提交">
原创<font color="#990000" size="-1"> <a href="http://www.520hacker.com">520hacker</a> </font>修改<font color="#990000" size="-1"><a href="http://www.uiokyu.com">ts</a></font></p>
</form>
</div>
<%else%>
本代理服务器工作正常<br>
<h2>连接带宽测试</h2><a name="K"></a>
<p>正在测试您与当前服务器之间的连接速度,请稍等...</p>
<%
Response.Flush:Response.Flush
tstart=timer()
for i=1 to 1024
Response.Write "<!--567890#########0#########0#########0#########0#########0#########0#########0#########012345-->" & vbcrlf
next
Response.Flush:Response.Flush
tend=timer()
ttime=tend-tstart + 0.00001
tnetspeed=100/(ttime)
tnetspeed2=tnetspeed * 8
twidth=int(tnetspeed * 0.16)+5
if twidth> 300 then twidth=300
tnetspeed=formatnumber(tnetspeed,2,,,0)
tnetspeed2=formatnumber(tnetspeed2,2,,,0)
%>
<style>
<!--
h1 ...{font-size:14px;color:#3F8805;font-family:Arial;margin:15px 0px 5px 0px}
h2 ...{font-size:12px;color:#000000;margin:15px 0px 8px 0px}
h3 ...{font-size:12px;color:#3F8805;font-family:Arial;margin:7px 0px 3px 12px;font-weight: normal;}
BODY,TD...{FONT-FAMILY: 宋体;FONT-SIZE: 12px;word-break:break-all}
tr...{BACKGROUND-COLOR: #EEFEE0}
A...{COLOR: #3F8805;TEXT-DECORATION: none}
A:hover...{COLOR: #000000;TEXT-DECORATION: underline}
A.a1...{COLOR: #000000;TEXT-DECORATION: none}
A.a1:hover...{COLOR: #3F8805;TEXT-DECORATION: underline}
table...{BORDER: #3F8805 1px solid;background-color:#3F8805;margin-left:12px}
p...{margin:5px 12px;color:#000000}
.input...{BORDER: #111111 1px solid;FONT-SIZE: 9pt;BACKGROUND-color: #F8FFF0}
.backs...{BACKGROUND-COLOR: #3F8805;COLOR: #ffffff;text-align:center}
.backq...{BACKGROUND-COLOR: #EEFEE0}
.backc...{BACKGROUND-COLOR: #3F8805;BORDER: medium none;COLOR: #ffffff;HEIGHT: 18px;font-size: 9pt}
-->
</STYLE>
<p>测试完成,向客户端传送 100k 字节数据共使用时间 <%=formatnumber(1000*(tend-tstart),2)%> 毫秒。</p>
<table border=0 width=500 cellspacing=1 cellpadding=3>
<tr><td align="center" style="padding:10px 0px">
<table style="margin:0px;border:none" align="center" width="400" border="0" cellspacing=0 cellpadding=0>
<tr><td width="45">| 56k猫</td><td width="160">| 2M ADSL</td><td width=200>| 10M LAN</td></tr>
</table>
<table style="margin:0px" class="input" align="center" width="400" border="0" cellspacing=0 cellpadding=0>
<tr class="input"><td width="<%=twidth%>" class="backs"></td><td width="<%=400-twidth %>"> <%=tnetspeed%>kB/s</td></tr>
</table>
<p style="margin:10px 0px 0px 0px">您与此服务器的连接速度是 <%=tnetspeed%> kB/s (相当于<%=tnetspeed2%>kbps)
<br><font color="#888888">换算关系: 1 Byte(字节) = 8 bit(位)</font></p>
</td></tr>
</table>
<%end if%>
</body>
</html>
|