Created
February 12, 2018 19:18
-
-
Save karthikax/321d97b61dd46dc42faf09d1963f96b3 to your computer and use it in GitHub Desktop.
Check Access via Cloudflare in PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( ! isset($_SERVER['HTTP_CF_VISITOR']) && ! isset($_SERVER['HTTP_CF_CONNECTING_IP']) ) { | |
die('Direct Access'); | |
} | |
echo 'Cloudflare Access'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment