var
url:string;
myIdHttp:TIdHTTP;
begin
Result := '';
myIdHttp := TIdHTTP.Create(nil);
myIdHttp.Request.UserAgent := 'Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Maxthon)';
myIdHttp.HandleRedirects:=true;
try
try
url := myIdHttp.Get('http://pv.sohu.com/cityjson?ie=utf-8');
url := STRINGReplace(url,'var returnCitySN = ','',[]);
//data := SO(url);
myIdHttp.ConnectTimeout := 6000;
//Result := data['cip'].AsString;
except
//log('自动获取IP失败');
end;
finally
myIdHttp.Free;
end;