PHP code example of snicco / open-redirect-protection-middleware

1. Go to this page and download the library: Download snicco/open-redirect-protection-middleware 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/ */

    

snicco / open-redirect-protection-middleware example snippets


use Snicco\Middleware\OpenRedirectProtection\OpenRedirectProtection;

// In your PSR-11 container.
$open_redirect_protection = new OpenRedirectProtection(
    'snicco.io', // the host of your application
    '/exit', // the page path
    [
        'stripe.com',
        'accounts.stripe.com'    
    ] // Whitelisted domains.
)