文章采集內容(Excel教程Excel函數Excel表格制作Excel2010Excel實(shí)用技巧Excel視頻教程)
優(yōu)采云 發(fā)布時(shí)間: 2021-09-13 12:09文章采集內容(Excel教程Excel函數Excel表格制作Excel2010Excel實(shí)用技巧Excel視頻教程)
核心功能代碼如下:
以上代碼可以獲取指定網(wǎng)頁(yè)的內容,如果全部獲取就更簡(jiǎn)單了
代碼如下:
'ASP獲取遠程網(wǎng)頁(yè)指定內容開(kāi)始
Dim wstr,str,url,start,over,dtime
url="http://sc.jb51.net/"
wstr=getHTTPPage(url)
body=wstr
如果你想在本地保存代碼
Dim wstr,str,url,start,over,dtime
url="https://www.jb51.net/"
wstr=getHTTPPage(url)
filename="index.htm"
if wstr"" and request("action")="makeindex" then
body=wstr
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fout = fso.CreateTextFile(server.mappath(""&filename&""))
fout.Write body
fout.close
set fout=nothing
set fso=nothing
If Err.number=0 then
response.write("首頁(yè)生成成功??!")
end if
end if
您可以根據需要修改詳細信息。
以上是asp獲取遠程網(wǎng)頁(yè)指定內容的實(shí)現代碼的詳細內容。更多獲取遠程網(wǎng)頁(yè)內容的信息,請關(guān)注腳本首頁(yè)的其他相關(guān)文章!


