var
  KeyWord:string;
  
 
procedure MobileIDsearch;
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://www.ip138.com:8080/search.asp?action=mobile&mobile='+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 :=StrBetween(lst.strings[i+4],'class=tdc2>','</TD>'); //class=tdc2>1381170</TD>
	  s1:=StrBetween(lst.strings[i+8],'class=tdc2>','</TD>'); //class=tdc2>北京&nbsp;北京</TD>
	  s2:=StrBetween(lst.strings[i+12],'class=tdc2>','</TD>');
	  s3:=StrBetween(lst.strings[i+16],'class=tdc2>','</TD>');
	  s4:=StrBetween(lst.strings[i+20],'class=tdc2>','<a href');
	  if pos('&nbsp;',s1)>0 then 
	    s1:=copy(s1,1,pos('&nbsp;',s1)-1)+'  '+copy(s1,pos('&nbsp;',s1)+6,length(s1)-pos('&nbsp;',s1)-5);
	  if pos('<a href',lst.strings[i+20])<=0 then s4:='';
	  inifn.WriteString('Item2','Item0','您查询的手机号码段：'+s);
          inifn.WriteString('Item2','Item1','卡号归属地：'+s1);
	  inifn.WriteString('Item2','Item2','卡 类 型：'+s2);
	  inifn.WriteString('Item2','Item3','区  号：'+s3);
	  inifn.WriteString('Item2','Item4','邮  编：'+s4);
          end;
    end;
    RefreshSkin(True);
  finally
    lst.free; inifn.free;
  end;
end;

begin
  
  
end.