!!!请问如何得到一个URL的返回值????(50分)

T

thygw

Unregistered / Unconfirmed
GUEST, unregistred user!
用了一个比较愚笨的方法,比如:
调用 shellexecute(handle,nil,'http://www.sina.com.cn',nil,nil,sw_hide);但是我又不想IE显示出来!

实例说明上面的方式不能实现!

何如?
 
Delphi5有个TNMHTTP控件,下面的Delphi帮助的英文原文,自己看吧,有问题再商量
Declaration
procedure Get(URL: string); virtual;

Description
The Get method retrieves the document specified by the URL parameter.

If InputFileMode is TRUE, the document retrieved by the Get method is stored in the file that is specified by the Body property, and the header is stored in the file that is specified by the Header property.

If InputFileMode is FALSE, the document retrieved by the Get method is stored in the Body property as a string. The header is stored in the Header property as a string.

Parameters:
The URL parameter specifies the document to retrieve.

Note:
If the operation is successful, the OnSuccess event is called, passing CmdGET as the Cmd parameter.
If the operation fails, the OnFailure event is called, passing CmdGET as the Cmd parameter.
 
WinSocket

如D6中用TClientSocket封装了它

从URL字符串中分解出服务器地址,文件地址等信息
设置好ClientSocket.Host,ClientSocket.Port等信息

发送HTTP请求
SendStr:=SendStr+'GET /'+FileName+' HTTP/1.0'+#13#10;
SendStr:=SendStr+'Accept: */*'+#13#10;
SendStr:=SendStr+'Host: '+Host+#13#10;
SendStr:=SendStr+#13#10;
ClientSocket.Socket.SendText(SendStr);

你要的信息服务器自然会返回给你
 
好像不能实现:

实现过程中:在地址栏里输入地址回车后,会弹出一个“您查看的WEB页正在试图关闭窗口……”,

我的目的是:用程序来实现,但是不要出现IE和弹出来得提示窗口!

我只有今天一天时间来解决了,往后也不能上网了,各位大侠……………………!
 
快三点了,怎么还没有哪位大侠来帮我,快呀…………………………………………………………!
 
s:=idhttp.get(url);
 
可以考虑用curl
 
接受答案了.
 
顶部