This content is taken from zuobaoquan's technology sharing post ~
Http://topic.csdn.net/u/20090426/17/895a522b-3ca9-4b7b-baac-2f1b6f5c561a.html
// The principle is to send a GET request to whatismyip, And the whatismyip website returns the IP content! <Br/> // You can also create An ASPX page with the request. userhostaddress to obtain the IP address of the remote connection <br/> uses <br/> comobj; </P> <p> function _ getpublicipaddress: string; <br/> const <br/> defaultpublicipaddressurl: String = 'HTTP: // www.whatismyip.com/automation/n09230945.asp'; <br/> var <br/> XMLHTTP: olevariant; <br/> begin <br/> XMLHTTP: = createoleobject ('Microsoft. XMLHTTP '); <br/> try <br/> XMLHTTP. open ('get', defapubpublicipaddressurl, false); <br/> XMLHTTP. send; <br/> If XMLHTTP. status = '000000' then <br/> begin <br/> result: = XMLHTTP. responsetext; <br/> end; <br/> else t <br/> result: = '0. 0.0.0 '; <br/> end;