Avatar of pc-buddy

asked on 

PHP Sctrapper


I cant make this code work, I'm using the simple dom scrapper, it should

1. grab all current live urls
2. use the simple html dom to find a set div on the page
3. grab the text within that div
4. print each one out on the page.

// example of how to use basic selector to retrieve HTML contents
// grab the list of urls
$html = file_get_html('https://system.playtimenurseries.com/children/');

// find all link
foreach($html->find('a') as $e) {
$link = $e->href . '/invoices/2016/11';

foreach ($link as $p)
$html2 = file_get_html($p);

foreach($html2->find('div#gbar') as $i){
    echo $i->innertext . '<br>';

Open in new window


Avatar of undefined
Last Comment
Ray Paseur

8/22/2022 - Mon