Ads 468x60px

Smaller time frame always follow the bigger time frame. It's better wait be patience to enter in position than risk with BIG SL. Having strong trading discipline and taking losses when necessary is a sign of serious trading approach
Subscribe:

Labels

Wednesday, May 30, 2012

Get IP Public Address

unit Unit1;

interface
uses
  Windows, COMobj, Messages, SysUtils, Variants, Classes, Graphics, Controls, 
  Forms, Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Memo1: TMemo;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
strURL: String;
objHTTP: OleVariant;
begin
objHttp := CreateOleObject('WinHttp.WinHttpRequest.5.1');
try
strURL := 'http://automation.whatismyip.com/n09230945.asp';

//Send request To URL
objHTTP.Open('POST', strURL, False);
try
objHTTP.Send(Memo1.Lines.Text); Memo1.Lines.Text := objHTTP.ResponseText
except
on e: Exception do
MessageDlg('Error Occured: '+e.Message, mtError, [mbOK], 0);
end
finally
objHttp := Unassigned;
end;
end;
end.



Source


comments