Reputation: 11
basically I'm trying to make a small tracking plugin for my website, and I'm not sure what I am meant to put get the correct name for the element ID. I either get a blank screen or E_NOTICE : type 8 -- Trying to get property of non-object
I just want to display this
https://puu.sh/EItml/34bdb97863.png
Here was the first I tried...
include('simple_html_dom.php');
$html = file_get_html('https://www.auspost.com.au/mypost/track/#/details/63243842914091');
echo $html->find('title', 0)->plaintext;
$list = $html->find('div[class="event-header"]',0);
$list_array = $list->find('a');
for( $i = 0; $i < sizeof($list_array); $i++ ){
echo $list_array[$i]->plaintext;
echo "<br>";
}
?>
and the second
include('simple_html_dom.php');
$html = file_get_html('https://www.auspost.com.au/mypost/track/#/details/63243842914091');
echo $html->find('title', 0)->plaintext;
echo $ret = $html->find('event-location', 0)->plaintext;
?>
I did do some research but I'm unsure as to what I need to put, sorry if this is a timewaster, I'm just new to PHP...
Here's of where its located on the URL
https://puu.sh/EItlK/671f9877ed.png
https://puu.sh/EIt9C/be30180469.png
TIA :)
Upvotes: 1
Views: 79