Hello, i've written the following code which pretty works off-line (on local web) but NOT on-line... any clue would be helpful :o))
<?
if ($mot!="")
{
$connex=mysql_connect("localhost","root") or die ("connexion impossible");
$bd=mysql_select_db("mon_tableau",$connex);
$cherche=mysql_query("SELECT * FROM moteur");
while($resultat = mysql_fetch_array($cherche,MYSQL_ASSOC))
{
$recherche=htmlentities($resultat[contenu]);
$tableau=explode("<body>",$recherche);
foreach ($tableau as $ligne)
{
$fichier = file($ligne);
foreach ($fichier as $rang)
{
if (ereg($mot,$rang)) // FROM NOW ON IT doesn't work on line, I mean the test (if ereg...) doesn't work at all !!!
{
$rang=strip_tags($rang);
$rang=str_replace($mot,"<font size='3' color='#009999'><b>$mot</b></font>",$rang);
if (!ereg($mot,$rang)){$rang="";}
else
{
echo "<blockquote><a href=\"javascript:window.opener.location.href='indexa.php?page=$resultat[lien]';window.nouvi\">$resultat[contenu]</a><br><i>$rang</i></blockquote>";
break;
}
}
}
}
}
mysql_close();
}
?>