File: //proc/self/root/var/www/html/updowncheck.php
<!DOCTYPE html>
<html>
<head>
<title>Monitor Test Page</title>
</head>
<body>
<h1>This is a monitoring page.</h1>
<?php
date_default_timezone_set('America/Phoenix');
echo '<p> PHP test; current time: ';
echo date("d F Y H:i:s O");
echo '</p>';
// Get server information for RUM
$hostname = gethostname();
if ($hostname === false) {
$hostname = php_uname('n');
if ($hostname === false) {
$hostname = '';
}
}
// Determine application code based on hostname
if (strpos($hostname, 'mcpnl') !== false) {
$ap = 'cpbh-mt';
} elseif (strpos($hostname, 'zcpnl') !== false) {
$ap = 'cpsh-oh';
} else {
$ap = 'cpsh';
}
// Determine environment and datacenter
if (strpos($hostname, 'tl') !== false) {
$basehost = 'test-secureserver.net';
preg_match('/^(.+?)tl/', $hostname, $matches);
$dcenter = $matches[1] ?? '';
} else {
// Production environment (default)
$basehost = 'secureserver.net';
preg_match('/^(.+?)pl/', $hostname, $matches);
$dcenter = $matches[1] ?? '';
}
// Get CloudLinux version
$cl_version = '';
if (file_exists('/etc/redhat-release')) {
$release = file_get_contents('/etc/redhat-release');
if ($release !== false && preg_match('/([0-9])[.]/', $release, $matches)) {
$cl_version = $matches[1];
}
}
// Set fixed cPanel user ID for gdlinuxm canary account
$cp_id = '100001';
?>
<p> PHP test complete. End transmission. </p>
<script>
'undefined'=== typeof _trfq || (window._trfq = []);
'undefined'=== typeof _trfd && (window._trfd=[]);
_trfd.push(
{'tccl.baseHost': <?php echo json_encode($basehost); ?>},
{'ap': <?php echo json_encode($ap); ?>},
{'server': <?php echo json_encode($hostname); ?>},
{'dcenter': <?php echo json_encode($dcenter); ?>},
{'cp_id': <?php echo json_encode($cp_id); ?>},
{'cp_cl': <?php echo json_encode($cl_version); ?>}
);
// Monitoring performance to make your website faster. If you want to opt-out, please contact web hosting support.
</script>
<script src='https://img1.wsimg.com/traffic-assets/js/tccl.min.js'></script>
</body>
</html>