Browse Source

show only main table

develop
Robin Thoni 8 years ago
parent
commit
21a0954e09
1 changed files with 10 additions and 1 deletions
  1. 10
    1
      index.php

+ 10
- 1
index.php View File

25
         'session' => getenv('PERIOD')
25
         'session' => getenv('PERIOD')
26
     ]
26
     ]
27
 ]);
27
 ]);
28
-echo (string)$response->getBody();
28
+
29
+$body = (string)$response->getBody();
30
+
31
+$doc = new DOMDocument();
32
+$doc->loadHTML($body);
33
+$xpath = new DOMXpath($doc);
34
+$div = $xpath->query("//div[@id='partie_centrale']");
35
+$table = $doc->saveHTML($div[0]);
36
+
37
+echo $table;

Loading…
Cancel
Save