<?php
include('https://github.com/samacs/simple_html_dom/blob/master/simple_html_dom.php');
// Retrieve the DOM from a given URL
$html = file_get_html('http://navbharattimes.indiatimes.com/');
// Find all "A" tags and print their HREFs
foreach($html->find('a') as $e)
echo "<a href='". $e->href."'>". $e->innertext . '</a><br>';
include('https://github.com/samacs/simple_html_dom/blob/master/simple_html_dom.php');
// Retrieve the DOM from a given URL
$html = file_get_html('http://navbharattimes.indiatimes.com/');
// Find all "A" tags and print their HREFs
foreach($html->find('a') as $e)
echo "<a href='". $e->href."'>". $e->innertext . '</a><br>';
Comments
Post a Comment