PHP code example of natanael-aguiar / safe-redirect

1. Go to this page and download the library: Download natanael-aguiar/safe-redirect 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/ */

    

natanael-aguiar / safe-redirect example snippets




afeRedirect\SafeRedirect;

// Creating a SafeRedirect instance with custom status code (optional)
$redirect = new SafeRedirect(301);

// Redirecting to a specific URL
$redirect->to('https://example.com');