PHP code example of coercive / headerstatus

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

    

coercive / headerstatus example snippets


use Coercive\Utility\HeaderStatus

# SEND - 200 Defalut Status
HeaderStatus::send();

# SEND - Your Status : Example 301
HeaderStatus::send( 301 );

# SEND - Force don't use php function "http_response_code"
HeaderStatus::send( 418, TRUE );