Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include('../simplehtmldom/simple_html_dom.php');
- // -----------------------------------------------------------------------------
- // Retrieve the DOM from a given URL
- $html = file_get_html('http://ketquaxoso.24h.com.vn/');
- $mbso=array("DB","G1","G2","G3","G4","G5","G6","G7");
- // Find all TD tags with "class=number_kq]"
- $i = 0;
- foreach($html->find('td[class=number_kq]') as $e) {
- if ($i <8) {
- $mbso[$i] = $e->innertext;
- $i++;
- }
- }
- echo json_encode($mbso);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment