PHP code example of akane0151 / target-crawler

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

    

akane0151 / target-crawler example snippets


   'url' => "https://google.com"
   
   'elements' => array(
        'a .menu-item',
        'table tbody tr .id'
    )
   

   public function getPrice(){
        //call doCrawl to execute crawl request to target and fetch the element data
        return TargetCrawler::doCrawl();
    }
   
sh
   php artisan vendor:publish