Advertisement
TLama

Untitled

Nov 19th, 2014
356
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.65 KB | None | 0 0
  1. procedure ViewTaxInfoByCode(WebBrowser: TWebBrowser; Code: Integer);
  2. var
  3.   S: string;
  4.   I: Integer;
  5.   Headers: OleVariant;
  6.   PostData: OleVariant;
  7. begin
  8.   S := 'B1=VIZUALIZARE&pagina=domenii&cod=' + IntToStr(Code);
  9.   PostData := VarArrayCreate([0, Length(S) - 1], varByte);
  10.   for I := 1 to Length(S) do
  11.     PostData[I - 1] := Ord(S[I]);
  12.   Headers := 'Content-Type: application/x-www-form-urlencoded' + #10#13;
  13.   WebBrowser.Navigate('http://www.mfinante.ro/infocodfiscal.html', EmptyParam, EmptyParam, PostData, Headers);
  14. end;
  15.  
  16. // possible usage
  17. procedure TForm1.Button1Click(Sender: TObject);
  18. begin
  19.   ViewTaxInfoByCode(WebBrowser1, 1234);
  20. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement