{"id":198,"date":"2007-05-12T16:56:18","date_gmt":"2007-05-12T14:56:18","guid":{"rendered":" http:\/\/www.nsonic.de\/blog\/2007\/05\/get-your-internet-ip-address\/"},"modified":"2007-05-12T16:56:20","modified_gmt":"2007-05-12T14:56:20","slug":"get-your-internet-ip-address","status":"publish","type":"post","link":"https:\/\/www.nsonic.de\/blog\/2007\/05\/get-your-internet-ip-address\/","title":{"rendered":"Get your internet IP address"},"content":{"rendered":"<p><em>\/\/How to get your local IP (internet).<br \/>\n\/\/You will have to include Winsock.pas<br \/>\n<\/em><br \/>\n[code lang=&#8221;delphi&#8221;]function TForm1.LocalIP : string;<br \/>\ntype<br \/>\n    TaPInAddr = array [0..10] of PInAddr;<br \/>\n    PaPInAddr = ^TaPInAddr;<br \/>\nvar<br \/>\n    phe  : PHostEnt;<br \/>\n    pptr : PaPInAddr;<br \/>\n    Buffer : array [0..63] of char;<br \/>\n    I    : Integer;<br \/>\n    GInitData      : TWSADATA;<br \/>\nbegin<br \/>\n    WSAStartup($101, GInitData);<br \/>\n    Result := &#8221;;<br \/>\n    GetHostName(Buffer, SizeOf(Buffer));<br \/>\n    phe :=GetHostByName(buffer);<br \/>\n    if phe = nil then Exit;<br \/>\n    pptr := PaPInAddr(Phe^.h_addr_list);<br \/>\n    I := 0;<br \/>\n    while pptr^[I] <> nil do begin<br \/>\n      result:=StrPas(inet_ntoa(pptr^[I]^));<br \/>\n      Inc(I);<br \/>\n    end;<br \/>\n    WSACleanup;<br \/>\nend;<br \/>\n[\/code]<\/p>\n<p>[tags]Delphi, Network, Internet[\/tags]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/\/How to get your local IP (internet). \/\/You will have to include Winsock.pas [code lang=&#8221;delphi&#8221;]function TForm1.LocalIP : string; type TaPInAddr = array [0..10]&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[11],"tags":[75,106,116],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p71Tml-3c","_links":{"self":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/posts\/198"}],"collection":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/comments?post=198"}],"version-history":[{"count":0,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/posts\/198\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/media?parent=198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/categories?post=198"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/tags?post=198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}