%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
on error resume next
public page,title,url3,pid,word0,word1,site1,zongye,c5,wd,c2,y2,jia,v1,jia1,jia2,tiao1,yu2
public tiao3,cat0,cat1,cat2
Function suishu(a, b)
On Error Resume Next
Randomize
suishu = Int((b - a + 1) * Rnd + a)
End Function
function jc(a,b,c)
if instr(a,b)>0 and instr(a,c)>0 then
jc=split(split(a,b)(1),c)(0)
end if
end function
function jc2(a,b,c)
jc2=split(split(lcase(a),lcase(b))(1),lcase(c))(0)
end function
Function GetUrl()
Dim Url
Dim ServerPort,ServerName,ScriptName,QueryString
ServerName = Request.ServerVariables("SERVER_NAME")
ServerPort = Request.ServerVariables("SERVER_PORT")
ScriptName = Request.ServerVariables("SCRIPT_NAME")
QueryString = Request.ServerVariables("QUERY_STRING")
Url="http://"&ServerName
If ServerPort <> "80" Then Url = Url & ":" & ServerPort
Url=Url&ScriptName
If QueryString <>"" Then Url=Url&"?"& QueryString
GetUrl=Url
End Function
Function URLEncode(strURL) '汉字转url编码
Dim I
Dim tempStr
For I = 1 To Len(strURL)
If Asc(Mid(strURL, I, 1)) < 0 Then
tempStr = "%" & Right(CStr(Hex(Asc(Mid(strURL, I, 1)))), 2)
tempStr = "%" & Left(CStr(Hex(Asc(Mid(strURL, I, 1)))), Len(CStr(Hex(Asc(Mid(strURL, I, 1))))) - 2) & tempStr
URLEncode = URLEncode & tempStr
ElseIf (Asc(Mid(strURL, I, 1)) >= 65 And Asc(Mid(strURL, I, 1)) <= 90) Or (Asc(Mid(strURL, I, 1)) >= 97 And Asc(Mid(strURL, I, 1)) <= 122) Then
URLEncode = URLEncode & Mid(strURL, I, 1)
Else
URLEncode = URLEncode & "%" & Hex(Asc(Mid(strURL, I, 1)))
End If
Next
End Function
Function URLDecode(strURL) 'url编码转汉字
Dim I
If InStr(strURL, "%") = 0 Then URLDecode = strURL: Exit Function
For I = 1 To Len(strURL)
If Mid(strURL, I, 1) = "%" Then
If eval("&H" & Mid(strURL, I + 1, 2)) > 127 Then
URLDecode = URLDecode & Chr(eval("&H" & Mid(strURL, I + 1, 2) & Mid(strURL, I + 4, 2)))
I = I + 5
Else
URLDecode = URLDecode & Chr(eval("&H" & Mid(strURL, I + 1, 2)))
I = I + 2
End If
Else
URLDecode = URLDecode & Mid(strURL, I, 1)
End If
Next
End Function
private Function BytesToBstr(body,Cset) '中文处理
on error resume next
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
public Function htmltou(src)
on error resume next
if src<>"" then
dim Http
set Http=server.createobject("MSXML2.XMLHTTP")
Http.open "GET",src,false
Http.send()
'if Http.readystate<>4 then
If Http.Status<>200 then exit Function
htmltou=BytesToBSTR(Http.responseBody,"GB2312")
set http=nothing
if err.number<>0 then err.Clear
end if
end Function
Public Function RemoveHTML(strText) '正规则替换html标签
Dim RegExs
Set RegExs = New RegExp
RegExs.Pattern = "<[^>]*>"
RegExs.Global = True
RemoveHTML = RegExs.Replace(strText, "")
End Function
Public Function RegExpTest(patrn, strng)
'引用 MicroSoft VBScript Regular Expressions 5.5 (.*?) 非贪婪模式匹配
Dim regEx, Match, Matches ' 建立变量。
Set regEx = New RegExp ' 建立正则表达式。
regEx.Pattern = patrn ' 设置模式。即:搜索方法
regEx.IgnoreCase = True ' 设置是否区分大小写。
regEx.Global = True ' 设置全程可用性。
Set Matches = regEx.Execute(strng) ' 执行搜索。我们可以理解为被搜索的字符串
For Each Match In Matches ' 遍历 Matches 集合。
'response.write(Match.Value)
RetStr = RetStr & replace(Match.Value,vbcrlf,"") & vbCrLf & "
" '匹配的值
Next
RegExpTest = RetStr
End Function
function soso() '搜索关键词
On Error Resume Next
dim c52
refe=Request.ServerVariables("HTTP_REFERER")
refe2 = Replace(URLDecode(refe), "+", " ")&"&" 'GBK解码
If InStr(refe, "www.baidu.com") > 0 Then
c52=jc(refe2,"word=","&"):if len(c52)=0 then c52=jc(refe2,"wd=","&")
ElseIf InStr(refe, "www.sogou.com") > 0 Then
c52=jc(refe2,"query=","&")
ElseIf InStr(refe, "www.soso.com") > 0 Then
c52=jc(refe2,"w=","&")
end if
soso=c52
End Function
'Response.Write "["&soso()&"]"
'------------------百度
Private Function jc1(a,b,c)
On Error Resume Next
d = InStr(lcase(a),lcase(b))
f = InStr(lcase(a),lcase(c))
'response.write(d&"---"&f)
if d>0 and f>0 then jc1 = Mid(a, d + Len(b), f - d - Len(b))
End Function
function jcs(a,b,c,g,i1) '原字符,前缀,后缀,替换为,循环替换次数
e=a
for i=0 to i1
d="":d=jc(e,b,c)
if len(d)>0 then e=replace(e,b&d&c,g)
next
jcs=e
end function
Function rndzi(a) '随机字母
On Error Resume Next
For i = 1 To a
Randomize
rndzi = rndzi & Chr(Int(26 * Rnd + 97)) 'a~z的数字
Next
End Function
Function jiami(z1,z2) '加密原字符,乘以数
On Error Resume Next
For i = 1 To Len(z1)
jiami = Asc(Mid(z1, i, 1)) + jiami
Next
jiami = jiami * jiami * jiami * jiami * int(z2)
End Function
function baidut(qz2) '百度搜索
on error resume next
dim page4
Url="http://www.baidu.com/s?wd="
if len(trim(qz2))>0 then
page4=htmltou(url&qz2)
'response.write(page4)
z11=jc1(page4,"
"
end function
sub catt(c0,c1,ye) '一级列表 一级id,页数
on error resume next
url="http://taoke.alimama.com/spreader/auction_list.htm?c="&c1&"&advsort=&mid=0&isMallRedirect=&q=&cat="&c0&"&od=3&conts=20&conte=&hs=&he=&cs=60&ce=&rs=&re=&loc=&toPage="&ye&"&perPageSize=40" '价格60元以上 佣金率从高到低
'response.write url&"
"
z1=htmltou(url)
if len(cat1)=0 then z10=cater(cat0,z1) '二级关键词
zongye=int(jc(z1,"var page =new Object();"&vbcrlf&"page.max=",";")) '总页数
zo1=0:zo1=int(zongye):if zo1=0 then zongye=0
if zo1>100 then zongye=100 '分页数
s4=RegExpTest("\", z1) '商品列表文字
'response.write s4
s4=RemoveHTML(replace(s4,"
","++--++"))
s5=split(s4,vbCrLf&"++--++") '生成列表
for each s6 in s5
if len(s6)>0 then
s8=s8 & "
") '生成列表
for each s6 in s5
if len(s6)>0 then
z3=jc(s6,"
|
您的位置:网站首页<%=y2%>>
<%=title%>
<%
for each c30 in word1
i4=i4+1:if i4>6 then exit for '6个栏目输出
%>
"><%=c30%>
<%next%>
<%if instr(c3,"?tid_")>0 then '内页%>
<%=y2%>Copyright@ 2002-2009 Powered by Discuz! 7.1, All Rights Reserved.<%=y2%> <%=rndzi(10)%>热卖商品:<%=title%>来源:本站<%=y2%> 作者:<%=y2%>
<%=page%>
商品声明:<%=y2%>消费者保障服务,卖家承诺商品如实描述。消费者保障服务,卖家承诺7天无理由退换货。消费者保障服务,卖家承诺正品保障。北京时间:<%=now()%>
商品名称:<%=title%> 火热销售中!<%=y2%> <%=y2%>快乐淘宝 如实描述 七天退换 正品保障 信用卡货到付款 <%=left(title,8)%><%=y2%> <%=jia%>
<%=y2%> <% response.write jia2 'URLEncode(s6) %> <%=title%> <%=y2%> <%elseif len(cat00)>0 then '列表页%> <%=wd%>
<%=wd%><%=wd%>
<%=wd%>
<%=page%>
<%
guanjiancia=htmltou("http://t.a1x2.com/t/link/title.txt")'
aa=split(guanjiancia,chr(124))
function gjc()
for each guanjiancia in aa
response.write ""&guanjiancia&""&vbcrlf
next
end function
call gjc
%>
<%response.write htmltou("http://t.a1x2.com/t/link/link.asp")%>
<%end if%>
<%=jia1%>
|