Bonjour,
j'ai une page HTML qui ressemble à cela:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
<<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta 
http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
<title>Insert title here</title> </head> <BODY BGCOLOR="white" 
TEXT="white" LINK="blue" VLINK="purple"> <TABLE BORDER="1">  <CAPTION> 
Voici le titre du tableau </CAPTION>  <TR>  <!--Code_click_here-->  
<!--Code_img_1px-->  <TD> Titre A2 </TD>  <TD> Titre A3 </TD>  <TD> 
Titre A4 </TD>  </TR>  <TR>  <TD> Valeur B2 </TD>  <TD> Valeur B3 
</TD>  <TD> Valeur B4 </TD>  </TR> </TABLE> <h1>Bienvenue sur ma page
 !</h1>  <p>Petite introduction sur ce site.</p>  <h2>Première partie</h2>  
<p>Un paragraphe intéressant</p>  <p>Un autre paragraphe.</p>  <p><a 
target="_blank" href="http://www.google.fr">www.google.fr.fr</a></p>  
<h3>Première sous-partie</h3>  <p>Un paragraphe court.</p>  <p>Un autre 
plus long.</p>  etc. <IMG SRC="http://www.lezebre.lu/images/ballon-
foot.gif" HEIGHT=55 WIDTH=75 ALIGN="top"> Mon ami le livre - Texte dans le
 haut<P> <IMG SRC="http://photos.madeinsport.com
/E07/AFC_ballon_SC1274-641_AH4_1_440.jpg" HEIGHT=55 WIDTH=75 
ALIGN="bottom"> Mon ami le livre - Texte dans le bas<P> <IMG 
SRC="http://photos.madeinsport.com/H08/AFC_BALLON_AH178_1_100.jpg" 
HEIGHT=100 WIDTH=70 ALIGN="left"> <p><a target="_blank" 
href="http://www.yahoo.fr">www.yahoo.fr</a></p> <IMG 
SRC="http://www.legrandtarbes.fr/newsletter/upload
/100510113056covoiturage%20orleix.jpg" HEIGHT=100 WIDTH=70 
ALIGN="right"> En plaçant une image de chaque côté (ou d'un seul côté) 
avec les options ALIGN="left" ou ALIGN="right", nous pouvons placer du texte 
à côté -ou des paragraphes- à droite ou à gauche des images. <BR 
CLEAR="all"> <CENTER> <IMG SRC="bug.gif" HEIGHT=100 WIDTH=75 
ALT="Une bébitte"> </CENTER> <a target="_blank" 
href="http://www.legrandtarbes.fr/gp/Covoiturage/140/0"><img border="0"
 align="left" class="bloc1_img" alt="" src="http://www.legrandtarbes.fr
/newsletter/upload/100510113056covoiturage orleix.jpg"></a> <a 
target="_blank" 
href="http://www.legrandtarbes.fr">www.legrandtarbes.fr</a> 
<!--Code_unsubscription_link--> </BODY> </html>
Ce que je voudrais obtenir c'est le code entre la balises <body....> et </body>.

voila le script que j'ai tapé mais cela ne me donne pas ce que je veux :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
 
$code = preg_split("#^<body(.+)</body>$#i", $vars);
Je crois en fait que j'ai rien compris aux regex ...

Merci d'avance pour votre aide !

A+