摘要:
Delphi获取公网IP地址函数1usesIdHTTP;2functionGetPublicIP:string;3var4strIP,URL:string;5iStart,iEnd:Integer;6MyIdHTTP:TIdHTTP;7begin8Result:='';9MyIdHTTP:=TIdHTTP.Create(nil);10try11try12URL:=MyIdHTTP.Get('http://www.ip138.com/ip2city.asp');13except14end;15finally16MyIdHTTP.Free;17end;1819ifL 阅读全文