不能用idhttp.post等方法,因为网站限制了跨站提交.
我的代码总是出错,而且总有跳过的现象,召唤大牛支招.procedure TForm1.Button1Click(Sender: TObject);
var
sURL : array[1..5] of String;
i : Integer;
begin
sURL[1] := 'http://1';
sURL[2] := 'http://2';
sURL[3] := 'http://3';
sURL[4] := 'http://4;
sURL[5] := 'http://5';
for i := 1 to 5 do
begin
WebBrowser1.Navigate(sURL[i]);
while True do
begin
Application.ProcessMessages();
if not WebBrowser1.Busy then break;
end;
end;
end;procedure TForm1.WebBrowser1DocumentComplete
begin
docf := webbrowser1.oleobject.document.all.item('Content',0);
docf.value := '提交内容';
docf:=webbrowser1.OleObject.document.all.item('Submit',0);
docf.click;
end;
我的代码总是出错,而且总有跳过的现象,召唤大牛支招.procedure TForm1.Button1Click(Sender: TObject);
var
sURL : array[1..5] of String;
i : Integer;
begin
sURL[1] := 'http://1';
sURL[2] := 'http://2';
sURL[3] := 'http://3';
sURL[4] := 'http://4;
sURL[5] := 'http://5';
for i := 1 to 5 do
begin
WebBrowser1.Navigate(sURL[i]);
while True do
begin
Application.ProcessMessages();
if not WebBrowser1.Busy then break;
end;
end;
end;procedure TForm1.WebBrowser1DocumentComplete
begin
docf := webbrowser1.oleobject.document.all.item('Content',0);
docf.value := '提交内容';
docf:=webbrowser1.OleObject.document.all.item('Submit',0);
docf.click;
end;
Function CheckUrl(url)
Dim Where:Where=Request.SeverVariables("HTTP_REFERER")
If Where=url Then
Call main()
Else
Response.write("很抱歉,您必须从"&url&"访问才能进来!")
End if
End Function