December 15, 201015 yr Hello, my code is: <?php /* update your path accordingly */ //include (scraperstuff/simple_html_dom.php); //$includeFile = file_get_contents(".../simple_html_dom.php"); //echo $includeFile; include $_SERVER['DOCUMENT_ROOT'] . '/scraperstuff/simple_html_dom.php'; $search_term = "Frankfurt"; $url = "http://www.blahblah.com/germany/{$search_term}/sightseeing"; $html = file_get_html($url); /* Get all table rows having the id attribute named 'rhsline'. As the list of sponsored links is in the 'ol' tag; as can be seen from the DOM tree above; we use the 'children' function on the $data object to get the sponsored links. */ $data = $html->find('div[class=content]'); /* Make sure that sponsors ads are available, Some keywords do not have sponsor ads. */ if(isset($data[0])) echo $data[0]->children(1); ?> I need some help removing links from the returned content. Cheers in advance!
Create an account or sign in to comment