1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
$token = "Marly";
$basicUrl = "http://www.lion1906.com/Php/Resultats/Resultat_Localisation1.php?Ville=";
$url = $basicUrl.$token;
$html = file_get_contents($url);
$contains = contains($html,"sultats trouvés !");
if($contains){
echo "chaine trouvee";
$token = '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 Width=99% style="border:1px solid black;" bgcolor=#ffffff>';
$debutTableauAffichage = indexOf($html,$token);
}
else{}
function contains($chaine,$token){
if (ereg($token, $chaine)) {
return true;
} else {
return false;
}
}
function indexOf($chaine,$token){
return strrpos($chaine,$token);
} |
Partager