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就是得到的源码  
  • 相关阅读:
    素数路径Prime Path POJ3126 素数,BFS
    Fliptile POJ3279 DFS
    Find the Multiple POJ1426
    洗牌Shuffle'm Up POJ3087 模拟
    棋盘问题 POJ1321 DFS
    抓住那只牛!Catch That Cow POJ3278 BFS
    Dungeon Master POJ2251 三维BFS
    Splitting into digits CodeForce#1104A
    Ubuntu下手动安装Nvidia显卡驱动
    最大连续子序列和
  • 原文地址:https://www.cnblogs.com/netcorner/p/2912456.html
Copyright © 2011-2022 走看看