<? 
include("../config.php3");
include($BIB."bib_generic.php3");
  
  # on efface les anciens enregistrements
  $strsql = "DELETE FROM Foufoot";
  main_db_query($strsql);
  
  # on recupere et insere les nouveaux
  $FFTOP = file("http://www.foufoot.com/classement_general_kestufoot.asp"); 
  for($i=0;$i<count($FFTOP);$i++) { 
    $row = explode("&&",$FFTOP[$i]);
    
    $strsql = "INSERT INTO Foufoot
                  (Pos,Pseudo,Funnies,NbParties,Reussite,Hebdo,Serie)
                  VALUES
                  ('$row[0]','$row[1]','$row[2]','$row[3]','$row[4]','$row[5]','$row[6]')";
    main_db_query($strsql);
  }
?>