PHP code example of ampersa / surbl

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

    

ampersa / surbl example snippets


use Ampersa\SURBL\SURBL;
...

$surbl = new SURBL;
$result = $surbl->listed('http://ampersa.co.uk');
// Returns: (bool) false

$result = $surbl->listed('http://surbl-org-permanent-test-point.com/');
// Returns: (bool) true

$surbl = new SURBL(SURBL::LIST_PH | SURBL::LIST_MW);
$result = $surbl->listed('http://surbl-org-permanent-test-point.com/');
// Returns: (bool) false

$result = SURBL::isListed('http://surbl-org-permanent-test-point.com/');
// Returns: (bool) true

$result = SURBL::isListed('http://surbl-org-permanent-test-point.com/', SURBL::LIST_PH | SURBL::LIST_MW);
// Returns: (bool) false