第1个回答 2014-09-28
=-你必须会使用源代码!你可以鉴赏下列不关于你的问题~可能对你有好处 获取网页源代码的最简单办法,就是利用 WinInet 单元中的函数:uses WinInet;function GetWebPage(const Url: string):string;var Session, Http文件:HINTERNET; szSizeBuffer:Pointer; dwLengthSizeBuffer:DWord; dwReserved:DWord; dwFileSize:DWord; dwBytesRead:DWord; Contents:PChar;begin Session:=InternetOpen('',0,niL,niL,0); Http文件:=InternetOpenUrl(Session,PChar(Url),niL,0,0,0); dwLengthSizeBuffer:=1024; HttpQueryInfo(HttpFile,5,szSizeBuffer,dwLengthSizeBuffer,dwReserved); GetMem(Contents,dwFileSize); InternetReadFile(HttpFile,Contents,dwFileSize,dwBytesRead); InternetCloseHandle(HttpFile); InternetCloseHandle(Session); Result:=StrPas(Contents); FreeMem(Contents);end;使用时,直接把收到的源代码显示出来::Memo1.Text := GetWebPage(blog.asp?name=aliwy);本回答被提问者采纳