Created
June 6, 2022 07:16
-
-
Save binarykore/3ff9d7fe8cce6aa80b9a91895c4ec6e4 to your computer and use it in GitHub Desktop.
Prints either HTTP or HTTPs...
This file contains hidden or 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(!empty($_SERVER["REQUEST_SCHEME"])){ | |
| $_scheme = $_SERVER["REQUEST_SCHEME"]; | |
| }elseif(empty($_SERVER["REQUEST_SCHEME"])){ | |
| $_scheme = $_SERVER["HTTP_X_FORWARDED_PROTO"]; | |
| } | |
| echo($_scheme); | |
| //Prints either HTTP or HTTPs | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment