I got the following code:
<?php
include('simple_html_dom.php');
$html = file_get_html('http://www.google.com/search?q=BA236',false);
$e = $html->find("div[class=g]");
echo $e[0]->innertext;
?>
When I run it I get the first class of a google search result, which is:
British Airways Flight 236
Scheduled departs in 13 hours 13 mins
Departure DME 5:40 AM —
Moscow Dec 15
Arrival LHR 6:55 AM Terminal 5
London Dec 15
Scheduled departs in 1 day 13 hours
Departure DME 5:40 AM —
Moscow Dec 16
Arrival LHR 6:55 AM Terminal 5
London Dec 16
My Problem is I dont need all that information and I have no idea how to filter this echo because the Html code has no id´s or classes. I thought about hiding the html I don´t need with jquery or simple css but: Same Problem, I have no id´s or classes to call them.
So how can I filter the information out I don´t want. Please just show me an example, I´ll check for the html I need to remove myself. Thanks.