DEV Community

Cover image for Scrape all images using dom parser php
flixvision
flixvision

Posted on

Scrape all images using dom parser php

Here you scrape all images from Flix Vision website using HTML Dom parser.

Here is php code and try with it
`include("simple_html_dom.php");

$link = "https://flix-vision.com";

$html = file_get_html($link);


$images_array = array();

foreach ($html->find('table.infobox vcard td, img') as $element) {
    $allimages = strtok($element->src . '|', '|');
    array_push($images_array, $allimages);
}
Enter fullscreen mode Exit fullscreen mode

print_r($images_array);`

Top comments (0)