loadHTMLFile('teste.html');

// Consultando os links
$links = $dom->getElementsByTagName('a');
foreach ($links as $link) {
    echo $link->getAttribute('href').PHP_EOL;
}

// Consultando as imagens
$imgs = $dom->getElementsByTagName('img');
foreach ($imgs as $img) {
    echo $img->getAttribute('src').PHP_EOL;
}


?>
Este artigo foi útil ?
SimNão

6 Replies to “Lendo elementos HTML”

  1. 89game disse:

    Okay, 89game… not bad, not bad at all! Decent graphics and the gameplay is pretty smooth. If you’re looking to kill some time, this is worth checking out. Click here: 89game

  2. yonogamesbet disse:

    Trying out yonogamesbet and it seems alright. Decent betting options. It’s definitely worth a look to see if it suits your style of play: yonogamesbet

  3. luckymaxph disse:

    Trying my luck with luckymaxph. Hope the name lives up to the legend. Send positive vibes my way!

  4. jili0 disse:

    Hey guys, just wanted to say had some fun on jili0. Easy to navigate and cashed out without any problems. Give it a go jili0!

  5. Hey guys, anyone catch the ‘đá gà c1 hôm nay’ matches? Was hoping for some good fights! Check it out here đá gà c1 hôm nay if you missed it.

  6. jackpotcitybr disse:

    JackpotCityBR, ouvi falar que paga bem! To experimentando, tem uns jogos bem interessantes. Quem sabe não rola aquele jackpotzinho pra ajudar nas contas? Vê lá: jackpotcitybr

Deixe um comentário para luckymaxph Cancelar resposta

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

Close Search Window