Update networktool.php

This commit is contained in:
Namhyeon Go 2018-09-12 10:54:45 +09:00 committed by GitHub
parent 1d0082b1ed
commit bfaf022f2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,6 +83,20 @@ if(!function_exists("get_network_hostname")) {
}
}
if(!function_exists("get_os_platform")) {
function get_os_platform() {
$os = "";
if(defined("PHP_OS")) {
$os = PHP_OS;
} else {
$os = php_uname(s);
}
return $os;
}
}
if(!function_exists("check_secure_protocol")) {
function check_secure_protocol() {
return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443;