dialog annuinverse {
  title A Qui Est Ce Numero??
  size -1 -1 300 200
  button "Fermer",1, 5 175 285 20, cancel
  edit "Le Numéro De Téléphone",2, 5 15 150 20
  button "Lancer La Recherche",3, 170 15 120 20
  edit "Attente De Connexion",4, 5 45 285 20, read
  edit "",5, 5 70 285 100, multi, return, autovs, autohs, vsbar, hsbar
}

on *:dialog:annuinverse:sclick:3:{
  set %num.inversé $did(2)
  did -ra annuinverse 4 Connexion en cours....
  sockopen annuinverse www.infobel.com 80
}

on *:sockopen:annuinverse:{
  sockwrite -n annuinverse GET http://www.infobel.com/france/wp/revsearch/result.asp?qcitycode=&qstreetcode=&qnacecode=&qphone= $+ %num.inversé $+ &Submit.x=41&Submit.y=9 $crlf $+ $crlf
  did -ra annuinverse 4 Connexion effectué
}

on *:sockread:annuinverse:{
  if ($sockerr > 0) { return }
  :nextread
  sockread %temp
  if ( <TD WIDTH="83%"> isin %temp ) { did -a annuinverse 5 $remove(%temp,<TD WIDTH="83%"><B>,</B>,</TD>) $+ $crlf }
  if ( <TD WIDTH="85%" isin %temp ) { did -a annuinverse 5 $remove(%temp,<TD WIDTH="85%"ALIGN="left" VALIGN="top">,<TD WIDTH="85%" ALIGN="left" VALIGN="top">,</TD>,<A HREF='http://cobra.infobel.com/EShop/default.asp?product=france2001&lang=FR&ClientID=Directory'>,Plus sur les CDRom Infobel,<B>,</B>,</A>,</TD>,<A HREF>,<B>,</B>,</A>,<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" WIDTH="90%">,<TR><TD>,</TR>,</TABLE>) $+ $crlf

  }
