var
  KeyWord:string;
  
 
procedure CardIDsearch;
var 
  sVal,sex,birthday,place: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://qq.ip138.com/idsearch/index.asp?action=idcard&userid='+KeyWord); 
    if sVal<>'' then
    begin
    lst.text:=sVal;   
    if lst.count>0 then
      for i:=0 to lst.count-1 do
        if pos('查询结果',lst.strings[i])>0 then  
          begin
          sex     :=copy(lst.strings[i+4],pos('别：</td><td class="tdc2">',lst.strings[i+4])+26,2);
	  birthday:=copy(lst.strings[i+4],pos('期：</td><td class="tdc2">',lst.strings[i+4])+26,14);
	  j:=pos('地：</td><td class="tdc2">',lst.strings[i+4])+26;
	  k:=pos('<br/>',lst.strings[i+4]);
          place   :=copy(lst.strings[i+4],j,k-j);
	  inifn.WriteString('Item2','Item0','性    别：'+sex);
          inifn.WriteString('Item2','Item1','出生日期：'+birthday);
	  inifn.WriteString('Item2','Item2','发 证 地：'+place);
          end;
    end;
    RefreshSkin(True);
  finally
    lst.free; inifn.free;
  end;
end;

begin
  
  
end.