 
var
  KeyWord:string;
  
 
 
 
procedure zipSearch;
var 
  sVal,s,s1,s2,s3,s4:string;
  lst:TStrings;
  inifn:TIniFile; 
  i,j,k:integer;
begin
  try
    inifn:=TIniFile.create(SkinFileName);
    KeyWord:=inifn.ReadString('Item0','SMS1EditText','');
    lst:=TStringList.create; 
    sVal:=GetHttpStr('http://www2.ip138.com/post/search.asp?action=area2zone&area='+KeyWord); 
    if sVal<>'' then
    begin
    lst.text:=sVal; 
    //lst.SaveToFile('c:\11.txt'); 
    if lst.count>0 then
      for i:=0 to lst.count-1 do
        if pos('查询结果',lst.strings[i])>0 then  
          begin
          s:=lst.strings[i+2]; 
	  if pos('<tr><td style="padding-left:5%" noswap class=tdc2>',s)<=0 then 
	    begin
            inifn.WriteString('Item2','Item0','地名验证有误,请重新输入！'); 
	    break;
	    end;
	  s:=sfReplace(s,'<tr><td style="padding-left:5%" noswap class=tdc2>','',false);
	  s:=sfReplace(s,'</td></tr><tr><td align="center" class="tdc2"><a href="http://alexa.ip138.com/post/" target="_blank">更详细的...</a></td></tr>','',false);
          s:=sfReplace(s,'</td></tr>','<#C_CR>',false);
          s:=sfReplace(s,'&nbsp;',' ',false);
	  inifn.WriteString('Item2','Item0',s); 
	  break;
          end;
    end;
    RefreshSkin(True);
  finally
    lst.free; inifn.free;
  end;
end;

 
begin
 
  
end.