Prima cosa: usa preg_match() e non eregi() che è deprecata.
Prova così
Codice PHP:
if (preg_match('/<title>(.+)<\/title>/',$sorgente,$regs))
echo $regs[1]."<br />";
$parola = "Italia";
echo (strpos($parola, $regs[1]) !== FALSE) ? 'Si' : 'No' ;
Prima cosa: usa preg_match() e non eregi() che è deprecata.
Prova così
Codice PHP:
if (preg_match('/<title>(.+)<\/title>/',$sorgente,$regs))
echo $regs[1]."<br />";
$parola = "Italia";
echo (strpos($parola, $regs[1]) !== FALSE) ? 'Si' : 'No' ;