zoukankan      html  css  js  c++  java
  • 怎么用ASP获取一个网页的HTML代码

    < DOCTYPE html PUBLIC -WCDTD XHTML StrictEN httpwwwworgTRxhtmlDTDxhtml-strictdtd>
    Private   Function   bytes2BSTR(vIn)   '字符串函数   
      Dim   i,   ThischrCode,   NextchrCode   
      strReturn   =   ""   
      For   i   =   1   To   LenB(vIn)   
      ThischrCode   =   AscB(MidB(vIn,   i,   1))   
      If   ThischrCode   <   &H80   Then   
      strReturn   =   strReturn   &   Chr(ThischrCode)   
      Else   
      NextchrCode   =   AscB(MidB(vIn,   i   +   1,   1))   
      strReturn   =   strReturn   &   Chr(CLng(ThischrCode)   *   &H100   +   CInt(NextchrCode))   
      i   =   i   +   1   
      End   If   
      Next   
              bytes2BSTR   =   strReturn   
      End   Function   
        
      Function   GetURL(url)     '字符方式的xmlhttp   
              Set   Retrieval   =   Server.CreateObject("Microsoft.XMLHTTP")   
                          With   Retrieval   
                          .Open   "post",   url,   False,   "",   ""   
                          .Send   
                          GetURL   =   .ResponseText   
          GetURL   =   bytes2BSTR(.Responsebody)   
                          End   With   
              Set   Retrieval   =   Nothing   
      End   Function   
        
      用的时候这样   
      strs=geturl("http://www.xxxx.com")   
      strs就是得到的源码  
  • 相关阅读:
    Spring bean的自动装配
    JSP三大指令
    JSP九大内置对象
    Java异常的捕获顺序(多个catch)
    Integer.parseInt(s)和Integer.valueOf(s)之间的区别
    mysql忘记密码(MySQL5.7)
    java的四种内部类
    内存泄露查询
    深度优先和广度优先比较
    循环队列
  • 原文地址:https://www.cnblogs.com/netcorner/p/2912456.html
Copyright © 2011-2022 走看看