快
快乐起点
Unregistered / Unconfirmed
GUEST, unregistred user!
我想在地球在线http://www.earthol.com,上实现自动调用经纬度,执行GO到达,但一直报HTTP/1.1 405 not allowed错误,请大侠指点,代码如下:procedure TForm2.FormCreate(Sender: TObject);begin WebBrowser1.Navigate('http://www.earthol.com/');end;procedure TForm2.Button2Click(Sender: TObject);varvar Params: TStrings; HTML,Url:String; MD5Pass:String; ret:TStringstream;begin try Params:=TStringList.Create; ret:=TStringStream.Create(''); Params.Clear; Params.add('x=113'); Params.Add('&y=22'); IDHttp1.HandleRedirects := true; IdHTTP1.request.contenttype:='application/x-www-form-urlencoded'; Url:='http://www.earthol.com/'; IdHTTP1.Request.Referer:='http://www.earthol.com/'; IdHTTP1.Post(Url,Params,ret); HTML:=ret.datastring; Memo1.Lines.Text := HTML; if Pos(Url,HTML)=0 then begin ShowMessage('定位失败'); Exit; end; finally Params.Free; end;