PHP code example of originphp / dom
1. Go to this page and download the library: Download originphp/dom library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
originphp / dom example snippets
use Origin\Dom\Dom;
$dom = new Dom('1.0','UTF-8');
$dom->loadHtml($html); // this is a dom function
$element = $dom->querySelector('div.foo div.sub h1');
$paragraphs = $dom->querySelectorAll('div.p');