voila, j'ai un gros problème ...
devoir prendre le body.

j'y arrivais avant, mais j'ai changé mon regexp en preg_match, pour plus de rapidité.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
$html = file_get_contents('http://www.yahoo.fr');
 
preg_match('/<title[^>]*>(.*)<\/title>/', $html, $title);
preg_match('/<body[^>]*>(.*)<\/body>/', $html, $body);
print_r($title);
print_r($body);
voila, je chope le contenu de la source html de yahoo (par ex) et je cherche a avoir le titre et le body.

titre marche tres bien, body plante completement ??

des idées ??