php:<?php$url="http://www.baidu.com/index.html";echofile_get_contents($url);?>asp:<%FunctionGetBodyX(weburl)dimRetrieval'SetRetrieval=CreateObject("Microsoft."&"XMLHTTP")SetRetrieval=CreateObject("MSXML2."&"XMLHTTP")Retrieval.Open"Get",weburl,False,"",""Retrieval.SendGetBodyX=Retrieval.ResponseBodySetRetrieval=NothingEndFunctionFunctionBytesToBstr(body,Cset)'编码常用为GB2312和UTF-8dimobjstreamsetobjstream=Server.CreateObject("adodb."&"stream")objstream.Type=1objstream.Mode=3objstream.Openobjstream.Writebodyobjstream.Position=0objstream.Type=2objstream.Charset=CsetBytesToBstr=objstream.ReadTextobjstream.Closesetobjstream=nothingEndFunctiondimgetHTMLgetHTML=GetBodyX("http://www.baidu.com/index.html")getHTML=BytesToBstr(getHTML,"GB2312")response.write(getHTML)%>已经打包,需要自行下载研究
源码