View Single Post
  #13  
Unread 08-09-2005, 06:28 PM
nomas nomas is offline
A Dervish Cutthroat
 
Join Date: Jul 2005
Server: Antonia Bayle
Posts: 38
Default

Ok, I made it.

But MSIE needed.

Code:
procedure summitdata(const URL, iname, itype, izone, iloc, nodesc, idesc, user : string);
var
 WebBrowser1: Variant;
 VPostData, VFlags, VFrame, VHeaders: OleVariant;
 iLoop: Integer;
 PostData: string;
begin
 PostData := 'name='+iname+'&type='+itype+'&zone='+izone+'&loc='+iloc+'&nodescription='+nodesc+'&description='+idesc+
        '&submitting=1&username='+user+'&summit=Submit this POI';
 WebBrowser1 := CreateOleObject('InternetExplorer.Application');

 if Length(PostData)> 0 then
 begin
  VHeaders := 'Content-Type: application/x-www-form-urlencoded'+ #10#13#0;
  VPostData := VarArrayCreate([0, Length(PostData)], varByte);
  for iLoop := 0 to Length(PostData)- 1 do
  begin
    VPostData[iLoop] := Ord(PostData[iLoop+ 1]);
  end;
  VPostData[Length(PostData)] := 0;
  TVarData(VPostData).vType := varArray;
 end;

 VFlags := 0;
 WebBrowser1.Navigate2(url, VFlags, VFrame, VPostData, VHeaders);
 WebBrowser1.Visible := True;
end;
Attached Files
File Type: zip Eq2MapEdit.zip (265.9 KB, 456 views)
Reply With Quote