1

基本上我正在尝试为我的网站制作一个小型跟踪插件,但我不确定我要为元素 ID 设置正确的名称。我得到一个空白屏幕或 E_NOTICE :类型 8 - 试图获取非对象的属性

我只想显示这个

https://puu.sh/EItml/34bdb97863.png

这是我第一次尝试...

    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>";
    }

?>

第二个

    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;



?>

我确实做了一些研究,但我不确定我需要放什么,对不起,如果这是浪费时间,我只是 PHP 的新手......

这是它在 URL 上的位置

https://puu.sh/EItlK/671f9877ed.png

https://puu.sh/EIt9C/be30180469.png

蒂亚:)

4

0 回答 0