博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
怎么用ASP获取一个网页的HTML代码
阅读量:7154 次
发布时间:2019-06-29

本文共 864 字,大约阅读时间需要 2 分钟。

< 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(" ")   
  strs就是得到的源码  
本文转自 netcorner 博客园博客,原文链接:http://www.cnblogs.com/netcorner/archive/2006/12/22/2912456.html
  ,如需转载请自行联系原作者
你可能感兴趣的文章
第三次作业
查看>>
数据处理中白化Whitening的作用图解分析
查看>>
HDFS API编程
查看>>
【CF】328 D. Super M
查看>>
Nodejs Guides(二)
查看>>
EL表达式
查看>>
本地计算机 上的 MySQL 服务启动后停止。某些服务在未由其他服务或程序使用时将自动停止。...
查看>>
调用系统拍照
查看>>
NSUserDefaults保存应用中的数据
查看>>
用Gvim建立IDE编程环境 (Windows篇)_Nothing is impossible for a willing heart._百度空间...
查看>>
Chrome 插件
查看>>
c++的重载,覆盖与隐藏
查看>>
大数据的三个入口
查看>>
void指针
查看>>
hackerrank-knapsack
查看>>
Atitit. 软件开发中的管理哲学--一个伟大的事业必然是过程导向为主 过程导向 vs 结果导向...
查看>>
hive load from hdfs出错
查看>>
IOS开发:xcode5版本引发的问题
查看>>
asp.net 负载均衡下session存储的解决方法
查看>>
构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(17)-LinQ动态排序
查看>>