Answer the question
In order to leave comments, you need to log in
Parsing through simple_html_dom.php search in div?
Hello.
I decided to study the simple_html_dom library.
And I came across this problem.
I can't take a link from a certain diva.
include 'simple_html_dom.php';
$html = file_get_html('ссылка на страницу');
foreach ($html->find('div.wall_post_text a') as $e) {
echo $e->outertext;
}
foreach($html->find('div.wall_post_text') as $element) {
echo $element->href . '<br>';
}
<div class="wall_post_text">Чем лучше воспользоваться - таргетом или контекстом? Куда вести посетителя - на лендинг или в группу ВК? Что может помешать конвертации лидов в продажи? Лучше получить ответы на эти вопросы до запуска рекламной кампании!<br><br>Читать далее: <a href="https://site.ru/dom.php" title="https://site.ru/dom.php">ссылка</a></div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question