Default

// This line includes the Zero Site Protector library file.
require_once('../zero-site-protector.php');

// This line creates a new instance of the Zero Site Protector class.
$protectSite = new ZeroSiteProtector();

// This line starts the protection process by initializing the library.
$protectSite->startFile();

// This line outputs "Hello world" to the browser.
echo "Hello world";

// This line ends the protection process by finalizing the library and applying any security measures that have been configured.
$protectSite->endFile();

Scope

// This line includes the Zero Site Protector library file.
require_once('../zero-site-protector.php');

// This line creates a new instance of the Zero Site Protector class.
$protectSite = new ZeroSiteProtector();

// This line sets the scope of the http methods that will be protected by Zero Site Protector.
$protectSite->setMethodScope([ALLOWED_METHOD_GET, ALLOWED_METHOD_POST]);

// This line starts the protection process by initializing the library.
$protectSite->startFile();

// This line outputs "Hello world" to the browser.
echo "Hello world";

// This line ends the protection process by finalizing the library and applying any security measures that have been configured.
$protectSite->endFile();