www.ting88.com 웹 사이트를 입력하고 가수 앨범 페이지의 URL을 텍스트 상자에 복사하여 다음과 같은 노래의 다운로드 경로를 얻기 위해 제출하십시오.
소스 프로그램은 다음과 같습니다.
<%
onerrorresumenext
dimid, url, getcode, m, i, j, s, d, ns, nd, ns, num, name
id = trim (request.querystring ( "id"))
'1. 원본 페이지의 모든 내용을 가져옵니다
functiongethttppage (url)
dimhttp
setthttp = server.createobject ( "microsoft.xmlhttp")
http.open "get", url, false
http.send ()
ifhttp.readystate <> 4then
종료 기능
endif
gethttppage = bytestobstr (http.responsebody, "gb2312")
setthttp = 아무것도 없습니다
iferr.number <> 0thenerr.clear
최종 기능 장애
'2. 인코딩 변환
functionbyTestObstr (body, cset)
Dimobjstream
setobjstream = server.createobject ( "adodb.stream")
objstream.type = 1
objstream.mode = 3
objstream.open
objstream.writebody
objstream.position = 0
objstream.type = 2
objstream.charset = cset
bytestobstr = objstream.readtext
objstream.close
setobjstream = 아무것도
최종 기능 장애
'명시적인 URL을 얻으십시오
functionmyreplace (convstr)
convstr = replace (convstr, "yvi", "1")
convstr = replace (convstr, "esr", "2")
convstr = replace (convstr, "sxn", "3")
convstr = replace (convstr, "sti", "4")
convstr = replace (convstr, "wfu", "5")
convstr = replace (convstr, "lqu", "6")
convstr = replace (convstr, "qgi", "7")
convstr = replace (convstr, "bla", "8")
convstr = replace (convstr, "jfu", "9")
convstr = replace (convstr, "lsn", "0")
convstr = replace (convstr, "xpg", "/")
convstr = replace (convstr, "xqd", ".")
convstr = replace (convstr, "", "")
convstr = replace (convstr, "%20", "")
convstr = replace (convstr, "kwd", "wma")
myreplace = convstr
최종 기능 장애
ifid = "1"그런 다음
url = trim (request.form ( "txturl"))
ifurl = ""그런 다음
Response.Redirect ( "getMusic.asp")
응답 ()
endif
'url = "http://www.ting88.com/musiclist/1454.htm"
s = 0
d = 0
NS = 0
nd = 0
getCode = gethttppage (url)
num = mid (getcode, instrev (getcode, ". <ahref") -3,2) '노래 수를 얻습니다
name = mid (getcode, instr (getcode, "singer name :")+5,10) 'get singer
M = "http://218.75.78.189/33445566/"
response.write "<centre> 페이지는이 페이지에서"& name & "songs"& "<br/> <br/>"의 총계를 발견했습니다.