Commonly used ASP to crawl remote HTML functions

Source: Internet
Author: User
Tags end functions access
You can use remote access to XML data, or HTML file data. It is usually also used to get index.asp Dynamic home page through HTTP to generate static home and other uses ...

Remote Grab collection of the most commonly used a function, oneself extrapolate bar

You can use remote access to XML data, or HTML file data. It is usually also used to get index.asp Dynamic home page through HTTP to generate static home and other uses ...

Arisisi Www.alixixi.com also has more tutorials, welcome to search learning.

<%
function gethttppage (URL)
Dim adxmlhttp
Set adxmlhttp = Server.CreateObject ("Microsoft.XMLHTTP")
Adxmlhttp.open "Get", Url,false
Adxmlhttp.send ()
If Adxmlhttp.readystate <> 4 then Exit function
Gethttppage = Bytes2bstr (adxmlhttp.responsebody)
Set adxmlhttp = Nothing
End Function

function Bytes2bstr (VIN)
Dim Bytesstream,stringreturn
Set Bytesstream = Server. CreateObject ("ADODB.stream")
Bytesstream.type = 2
Bytesstream.open
Bytesstream.writetext Vin
bytesstream.position = 0
Bytesstream.charset = "gb2312"
Bytesstream.position = 2
Stringreturn = Bytesstream.readtext
Bytesstream.close
Set Bytesstream = Nothing
Bytes2bstr = Stringreturn
End Function
%>



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.