preg_match_all veut pas marcher :(
Posté : 08 juil. 2010, 01:16
le contenu du fichier fil.html est :
<td style="margin:0px;padding:0px; text-align:center;">
<embed
src="http"
type="application/x-shockwave-flash"
allowfullscreen="true"
width="640"
height=480>
</embed><br>
alors kan j essaye de recuperer les donnes entre embed et /embed ca ne marche pas. voila mon code , quelqun peut aider ce débutant
$homepage = file_get_contents("F:\\fil.html");
if (preg_match_all("!<embed( [^>]+)?>(.*)</embed>!i",$homepage,$matches))
{
print_r ($matches);
}
rien ni affiche ds le resultat
<td style="margin:0px;padding:0px; text-align:center;">
<embed
src="http"
type="application/x-shockwave-flash"
allowfullscreen="true"
width="640"
height=480>
</embed><br>
alors kan j essaye de recuperer les donnes entre embed et /embed ca ne marche pas. voila mon code , quelqun peut aider ce débutant
$homepage = file_get_contents("F:\\fil.html");
if (preg_match_all("!<embed( [^>]+)?>(.*)</embed>!i",$homepage,$matches))
{
print_r ($matches);
}
rien ni affiche ds le resultat