PHP code example of denis-kisel / laravel-phantomjs-curl

1. Go to this page and download the library: Download denis-kisel/laravel-phantomjs-curl 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/ */

    

denis-kisel / laravel-phantomjs-curl example snippets


//Return content page
\DenisKisel\PhantomCURL\PhantomCURL::to('https://amazon.com')->get() 


//Use Proxy
//$method available - [http|socks5|none] (default is http)
\DenisKisel\PhantomCURL\PhantomCURL::to('https://google.com')
    ->withProxy($ip, $port, $method, $login, $pass)
    ->get();
    
//Change window size (default is 1024x768)
\DenisKisel\PhantomCURL\PhantomCURL::to('https://google.com')->windowSize(1920, 1080)->get();
bash
php artisan vendor:publish --provider="DenisKisel\PhantomCURL\ServiceProvider" --tag="config"