PHP code example of pforret / pf_pageparser

1. Go to this page and download the library: Download pforret/pf_pageparser 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/ */

    

pforret / pf_pageparser example snippets

 php
$pp=New PfPageparser(["cacheTtl" => 300]);

$pp->load_from_url("http://www.example.com/products")
    ->trim("<table","</table>")
    ->split_chunks('</tr>')
    ->filter_chunks('product_id')
    ->parse_from_chunks('|Price: [\d\.]*|',true);

$prices=$pp->results();