PHP code example of sapistudio / seleniumstealth

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

    

sapistudio / seleniumstealth example snippets


use Facebook\WebDriver\Remote\RemoteWebDriver;
use SapiStudio\SeleniumStealth\SeleniumStealth;

// Chrome
$driver = RemoteWebDriver::create($serverUrl, DesiredCapabilities::chrome());
$driver = (new SeleniumStealth(driver))->usePhpWebriverClient()->makeStealth();


use Symfony\Component\Panther\Client;
use SapiStudio\SeleniumStealth\SeleniumStealth;

// Chrome
$driver = Client::createChromeClient();
$driver = (new SeleniumStealth(driver))->makeStealth();