Bonjour,
Je me casse la tête depuis un moment pour essayer de récupérer deux phrases d'une page WEB.
En fait, je suis entrain de développer une base de données, et pour éviter de saisir tous les champs dont les informations sont connues, je récupère quelques infos du WEB
J'ai suivi ce tuto http://www.dinduks.com/tutoriel-recu...web-avec-curl/
mais comme le POO n'est pas mon fort, je n'y arrive pas
Par exemple de la code d'une page Web ci-dessous, je veux récupérer uniquement les Coordonnées Est et Nord
Comment faire SVP
Merci
Code html : 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 </td></tr> <tr> <td width="40%" class=style2 height=21 align=right>np:</td> <td width="2%" class=style2 height=21></td> <td width="58%" class=style2 height=21 >Paris </td> </tr> <tr> <td width="40%" class=style2 height=21 align=right>Codes:</td> <td width="2%" class=style2 height=21></td> <td width="58%" class=style2 height=21 > 75</td> </tr> <tr> <td width="40%" class=style2 height=21 align=right>Coordonnées Nord :</td> <td width="2%" class=style2 height=21></td> <td width="58%" class=style2 height=21 >48° 51' 24'' </td> </tr> <tr> <td width="40%" class=style2 height=21 align=right>Coordonnées Est :</td> <td width="2%" class=style2 height=21></td> <td width="58%" class=style2 height=21 >2° 21' 07'' </td> </tr> <tr> <td width="40%" class=style2 height=21 align=right>Densité:</td> <td width="2%" class=style2 height=21></td> <td width="58%" class=style2 height=21> 21 289 hab./km2</td> </tr> <tr> <td width="40%" class=style2 height=21 align=right>Population:</td></td> <td width="2%" class=style2 height=21></td> <td width="58%" class=style2 height=21> 12 161 542 hab </td> </tr>
Partager