Copyright 2007 NGskin.com All Rights Reserved.粤ICP备07036865号 网站法律顾问:Itlaw-庄毅雄 <% ''''--------- 蜘蛛链 自动获取链接代码(ASP V20071206) 开始 ---------'''' '' 参数宽(width)、高(height)、行(row)、列(col)可自行调整 Response.Write GetLink("200" , "20" , "1" , "1" , "0") Function GetLink(width,height,row,col,secure) On Error Resume Next Dim Url Url = "http://" & Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("URL") If Trim(Request.QueryString) <> "" Then Url = Url & "?" & Trim(Request.QueryString) Url = "http://www.990990.cn/put.php?row=" & row & "&col=" & col & "&width=" & width & "&height=" & height & "&url=" & Server.URLEncode(Url) & "&secure=" & secure GetLink = GetHttpPage(Url) If Err.Number <> 0 Then GetLink = "" Err.Clear End If End Function Function GetHttpPage(HttpUrl) If IsNull(HttpUrl)=True Or Len(HttpUrl)<18 Then GetHttpPage="" Exit Function End If Dim Http Set Http=server.createobject("MSX" & "ML2.XM" & "LHT" & "TP") Http.open "GET",HttpUrl,False Http.Send() If Http.Readystate<>4 then Set Http=Nothing GetHttpPage="" Exit function End if GetHTTPPage=bytesToBSTR(Http.responseBody,"utf-8") Set Http=Nothing If Err.number<>0 then Err.Clear End If End Function Function BytesToBstr(Body,Cset) Dim Objstream Set Objstream = Server.CreateObject("ad" & "odb.str" & "eam") 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 ''''--------- 蜘蛛链 自动获取链接代码(ASP V20071206) 结束 ---------'''' %>