<?php    //    phpinfo();

    
$program            =    "StatusChecker()";
    
$version            =    "v1.1f-2g.2m";                //    Current source code on iMac.


//    START - New Login Code    ##
//
    
$int                =    60 60 24 366;            // Seconds, Minutes, Days = 366 Days in seconds.
    
$userID                =    "";
    
$pass                =    "";
//
    
$x0                 =   0;
//    @include("LogIn.php");
    
if($userID!="")    {    setcookie('username'$userIDfalse'/''');        }
    if(
$pass!="")    {    setcookie('password'md5($pass), false'/''');    }
//        
    
$Version            =    "0.0b";                        // ODD ??? Are we sure here ???
    
$Title                =    "Help";
    
$tld                =    "";
    
$tagline            =    "Help page";
//    $userID                =    $_SERVER['PHP_AUTH_DIGEST'];
//
//    END - New Login Code    ##

    
header('X-StatusChecker.php: Line #26');
    include(
'MyFuncations.php');                        //    Include the fuctions that are needed to make this page work.
    
SendHeaders();

    
$dns_for_httphost    =    @dns_get_record($httphost);
    if(
$ServerHTTP_DNT!="")    {    header("X-HTTP_DNT: Ture($ServerHTTP_DNT), I should not track you.");    }
        else                {    
header('X-HTTP_DNT: False, or not set, guess I should be tracking you.');    }

    
$headers_list    =    headers_list();                    //    var_dump(headers_list());
    
if (count($headers_list)!=0)
        {    
$headers    =    $headers_list[0];    };

//    Moved "Personal Computers / source coes & hosts section to the bottom of MyFuncations.

    
if ($phpself=="/ipaddress.php")    {    $program    =    "IPAddress()"; }
    if (
$phpself=="/IPAddress.php")    {    $program    =    "IPAddress()"; }

    
//    echo    $phpself;
    /* phpinfo */
    
if ($QueryString == "phpinfo")         {    echo "\n<hr>    \t\t\t\t\t\t\t    <! === phpinfo === !>\n\n"phpinfo();    exit;    }
    
/* headers */
    
if ($QueryString == "headers")         {    echo "\n<hr>    \t\t\t\t\t\t\t    <! === headers === !>\n\n"; echo "<pre>"var_dump(headers_list()); exit;    }
    
/* DUMP */
    
if ($QueryString == "dump")            {    echo "\n<hr>    \t\t\t\t\t\t\t    <! === phpinfo === !>\n\n"Dump(); exit;    }
    if (
$QueryString == "view-source")     {    show_source("./".$phpself);    exit;    }
    if (
$QueryString == "sourcecode")      {    show_source(@$_SERVER["SCRIPT_FILENAME"]);    exit;    }

//  echo('$_ENV[] = '); print_r($_ENV);
//  echo('$_SERVER[] = '); print_r($_SERVER);

    
$hhip                =    @gethostbyname($httphost);
    
$hostname            =    @gethostbyaddr($hhip);
//    echo "OUT :> byN=".gethostbyname("::1")." | byA=".gethostbyaddr("::1")." | hostname:$hostname |";
//    echo " hhip:$hhip | byA=".@gethostbyaddr($hhip)." | httphost=$httphost | byN=".gethostbyname($httphost);
//    echo    "<!--    --> &nbsp; &nbsp; Welcome...\n\n";
    
$i6                    =    gethostbyaddr6($hhip);
//    $hnipNAME            =    @gethostbyaddr($hostname) . " = " . $i6;
    
$hnipNAME            =    $i6;
//    echo "hnipNAME=$hnipNAME";
    
$servernameNAME        =    @gethostbyname($servername);
    
$rhostname            =    @gethostbyaddr($remoteaddr);
    
$ghbn                =    @gethostbyname($rhostname);
    
$ghba                =    @gethostbyaddr($ghbn);
    
$gghbn                =    @gethostbyname($ghba);
    
$network            =    preg_replace("/^[^.]+./""*."$hostname);
    
$rnetwork            =    preg_replace("/^[^.]+./""*."$rhostname);

    
$ismail                =    ($httphost == "mail.x7");
    
$secure                =    (@$_SERVER["HTTPS"]=="on");

    
$title                =    "$program - $version | $servername";
    
$favicon            =    "sunglasses.png";
    
$colornorm            =    "yellow";
    
$colorself            =    "orange";
    
$colorlime            =    "lime";
    
$colorred            =    "red";
    
$colorBLUE            =    "skyblue";
    
$bannercolor        =    $colornorm;
    
$SSLStatus            =    "Unknown";
    
$int                =    60 60 24 366;            // Seconds, Minutes, Days = 366 Days in seconds.
    
$cookievisitcounter;
    if    (
$ismail==true)
        {    
header("Location: https://mail.x7:4430"); exit;    }
    if    (
$secure)
        {    
$bannercolor=    $colorred;
            
$SSLStatus    =    "Secure";
            
$hsi        =    @$_SERVER['HTTPS_SERVER_ISSUER'];
            
$hss        =    @$_SERVER['HTTPS_SERVER_SUBJECT'];
            if((
$hsi=="")||($hss==""))  {
                
$ssidc = @$_SERVER['SSL_SERVER_I_DN_CN'];                
                
$sssdc = @$_SERVER['SSL_SERVER_S_DN_CN'];
            }
            if (
check_ssl())
                {    
$bannercolor=$colorself;
                    if (
sslself())    { $bannercolor=$colorBLUE;    $SSLStatus    =    "Self Signed";            }
                    else            { 
$bannercolor=$colorlime;    $SSLStatus    =    "SSL Cert seems Good";    }
                }
//            if ($_SERVER["HTTPS_SERVER_ISSUER"] == $_SERVER["HTTPS_SERVER_SUBJECT"])    {$bannercolor=$colorself;}
        
}
    
header('Y-StatusChecker.php: Line #105');

##  (Below, the setting of cookies, NEEDS IT's OWN FUNCTION ##
    
if    (isset($_COOKIE["visitcounter"]))
        {    
$visits    $_COOKIE["visitcounter"];    }
    else{    
$visits    0;    }
    
$cookievisitcounter $visits 1;
    if    (isset(
$_COOKIE["LastHost"]))
        {    
$LastHost    $_COOKIE["LastHost"];    }
    else{    
$LastHost    "";    }
    if    (isset(
$_COOKIE["LastRemote"]))
        {    
$LastRemote    $_COOKIE["LastRemote"];    }
    else{    
$LastRemote    "";    }
    
$hhDOMAIM    =    $httphost;
//    if (strpos($hhDOMAIM,".x7"))        {    $hhDOMAIM    =    ".x7";        }    // Not working w/ single domains.
    
if (strpos($hhDOMAIM,".7425.net"))    {    $hhDOMAIM    =    "7425.net";    }
    
setcookie("visitcounter",$cookievisitcounter,time()+$int,"",$hhDOMAIM);        //, 0
    
setcookie("LastHost",$httphost,time()+$int,"",$hhDOMAIM);
    
setcookie("LastRemote",$remoteaddr,time()+$int,"",$hhDOMAIM);
    if (
$servername==$servernameNAME)    {    $servernameNAME gethostbyname6($servername);    }
    if (
$hostname=="")                    {    $hostname        gethostbyname6($httphost);    }
    if (
$hnipNAME=="")                    {    $hnipNAME        gethostbyaddr6($hostname);    }
    
$ipV6            =    @gethostbyname6($httphost);
    
$hnipV6            =    gethostbyaddr6($ipV6);
/*
    echo    "servername: [$servername] <br>";
    echo    "servernameNAME: [$servernameNAME] <br>";
    echo    "hostname: [$hostname] <br>";
    echo    "hnipNAME: [$hnipNAME] <br>";
    echo    "name: [".@gethostbyname($servername)."] <br>";
    echo    " n4: [".@gethostbyaddr($servername)."] <br>";
    echo    " n6: [".@gethostbyaddr6($servername)."] <br>";
    echo    "ipv4: [".@gethostbyaddr($servernameNAME)."] <br>";
    echo    "ipv6: [".@gethostbyaddr6($servernameNAME)."] <br>";
*/
    
header('Z-StatusChecker.php: Line #140');
?><!DOCTYPE html>
<html><head>
    <?php    {    include('GoogleAnalytics.php');   }    ?>
    <title><?php    echo $title;    ?></title>
    <?php    {    include('head-for-bootstrap_fa.php');   }    ?>
    <link rel="shortcut icon"    href="<?php    echo $favicon;    ?>"    type="image/x-icon">
    <link rel="stylesheet" href="x7net/Site.css">
    <link rel="stylesheet" href="Site.css">
    <style type="text/css"><!--
        ::-moz-selection{    /* Code for Firefox |    color: red;    */    background:    <?php echo $bannercolor?>}
        ::selection        {    /*                        color: red;    */    background:    <?php echo $bannercolor?>}
        th                {    color:blue;         text-align: center    }
        td                {   color:coral;        border-color: silver; padding:0px 0px 0px 2px;    }
        h3, h3 a:link   {   color:white;        font-size:1.3em    }
        h5              {   margin-top:5px; }
    --></style>
</head>
<body>
<?php    include('header.php');
    if ( (
$phpself=="/ipaddress.php") || ($phpself=="/IPAddress.php") )
{    echo    
"<div class=\"container-fluid\">";
    echo    
"<h1>IPAddress</h1>";
    echo    
"    <div class=\"card-columns\">";
    echo    
'<div class="card border-dark mb-5" style="text-align:center">
                <div class="text-black bg-dark card-header">'
;
    echo    
"<h3 class=\"panel-title\"><a data-toggle=\"collapse\" href=\"#collapse00\">$program</a></h3>\n";
    echo    
'</div>
                <div class="card-body text-dark">
                    <h6 class="card-text" style="text-align:center" id="ns">Version</h6>'
;
    echo    
"        <div id=\"collapse00\" class=\"panel-collapse expand\">";        ### Start Colapsible Panel, this and the TWO line above.
    
echo    "            <div class=\"panel-body\">\n";
    echo    
"                <b>$version</b>";
    echo    
"        </div></div>";
    echo    
'    </div>
                <!--div class="card-footer bg-dark border-dark" style="text-align:center"><small style="color:white" class="">Time Remaining</small></div-->
            </div>'
;

    echo    
'<div class="card border-info mb-5" style="text-align:center">
                <div class="text-black bg-info card-header">'
;
    echo    
"<h3 class=\"panel-title\"><a data-toggle=\"collapse\" href=\"#collapse01\">Lookup IP Address</a></h3>\n";
    echo        
'</div>
                <div class="card-body text-info">
                    <h6 class="card-text" style="text-align:center" id="ns">Your IP Address is</h6>'
;
    echo    
"        <div id=\"collapse01\" class=\"panel-collapse expand\">";        ### Start Colapsible Panel, this and the TWO line above.
    
echo    "            <div class=\"panel-body\">\n";
    echo    
"                <kbd>$remoteaddr</kbd>";
    if    (
ip_is_private($remoteaddr))
        {    echo    
"    Private";    }
    else
        {    echo    
"    Public";    }
    echo    
"        </div></div>";
    echo    
'    </div>
                <!--div class="card-footer bg-info border-info" style="text-align:center"><small style="color:white" class="">Time Remaining</small></div-->
            </div>'
;
    if(
$remoteaddr == $localaddr){
    echo    
'
            <div class="card border-danger mb-5" style="text-align:center">
                <div class="text-black bg-danger card-header">'
;
    echo    
"        <h3 class=\"panel-title\"><a data-toggle=\"collapse\" href=\"#collapse01\">Local = Remote</a></h3>\n";
    echo    
'    </div>
                <div class="card-body text-danger">
                    <h6 class="card-text" style="text-align:center" id="ns">Both <i>IP Addresses</i> are the <b>same</b>.</h6>'
;
    echo    
"        <div id=\"collapse01\" class=\"panel-collapse expand\">";        ### Start Colapsible Panel, this and the TWO line above.
    
echo    "            <div class=\"panel-body\">\n";
    echo    
"                <kbd>$localaddr</kbd> = <kbd>$remoteaddr</kbd>";
    echo    
"        </div></div>";
    echo    
'    </div>
                <!--div class="card-footer bg-danger border-danger" style="text-align:center"><small style="color:white" class="">Time Remaining</small></div-->
            </div>'
;
    }
    if(
$localaddr!=""){
    echo    
'
            <div class="card border-warning mb-5" style="text-align:center">
                <div class="text-black bg-warning card-header">'
;
    echo    
"        <h3 class=\"panel-title\"><a data-toggle=\"collapse\" href=\"#collapse02\">Server</a></h3>\n";
    echo    
'    </div>
                <div class="card-body text-warning">
                    <h6 class="card-text" style="text-align:center" id="ns">Server Adddress</h6>'
;
    echo    
"        <div id=\"collapse02\" class=\"panel-collapse expand\">";        ### Start Colapsible Panel, this and the TWO line above.
    
echo    "            <div class=\"panel-body\">\n";
    echo    
"                <kbd>$localaddr</kbd>";
    echo    
"        </div></div>";
    echo    
'    </div>
                <!--div class="card-footer bg-success border-success" style="text-align:center"><small style="color:white" class="">Time Remaining</small></div-->
            </div>'
;
    }

    echo    
'
            <div class="card border-success mb-5" style="text-align:center">
                <div class="text-black bg-success card-header">'
;
    echo    
"        <h3 class=\"panel-title\"><a data-toggle=\"collapse\" href=\"#collapse03\">Host</a></h3>\n";
    echo    
'    </div>
                <div class="card-body text-success">
                    <h6 class="card-text" style="text-align:center" id="ns">Host</h6>'
;
    echo    
"        <div id=\"collapse03\" class=\"panel-collapse expand\">";        ### Start Colapsible Panel, this and the TWO line above.
    
echo    "            <div class=\"panel-body\">\n";
    echo    
"                <kbd>$httphost</kbd>";
    echo    
"        </div></div>";
    echo    
'    </div>
                <!--div class="card-footer bg-warning border-warning" style="text-align:center"><small style="color:white" class="">Time Remaining</small></div-->
            </div>'
;
##
    
if(($remoteaddr!="::1")&&($remoteaddr!="127.0.0.1"))
    {    
$whoisAnswer    whois($remoteaddr'whois.arin.net');
        
$whoisArray        explode("\n",$whoisAnswer);
//        print_r ($whoisArray);
//        echo "<pre><small>".$whoisAnswer."</small></pre>";
//        echo "<div class=\"bg-dark white\">";
        
foreach ($whoisArray as &$value) {
            if (
strpos($value':') !== false) {
                if (
strpos($value'#') !== 0) {
//                    echo $value."<br>";
                    
if (strpos($value'Organization') !== false)    {    $Organization explode(":"$value); }
                    else {    
$Organization explode(":""Error:No Whois data at arin.net");    }
                    if (
strpos($value'OrgName') !== false)        {    $OrgName explode(":"$value); }
                    if (
strpos($value'OrgId') !== false)            {    $OrgId explode(":"$value); }
                }
            }
        }
        
        if ((
$Organization[1]!="") && ((ip_is_private($remoteaddr))!=true))    {
            echo    
'<div class="card border-primary mb-5" style="text-align:center">
                        <div class="text-black bg-primary card-header">'
;
            echo    
"        <h3 class=\"panel-title\"><a data-toggle=\"collapse\" href=\"#collapse04\">Your ISP</a></h3>";
            echo    
'    </div>
                        <div class="card-body text-primary">
                            <h6 class="card-text" style="text-align:center" id="ns">Network</h6>'
;
            echo    
"        <div id=\"collapse04\" class=\"panel-collapse expand\">";        ### Start Colapsible Panel, this and the TWO line above.
            
echo    "            <div class=\"panel-body\">\n";
            echo    
"                <kbd>".$Organization[1]."</kbd>";
            echo    
"        </div></div>";
            echo    
'    </div>
                        <!--div class="card-footer bg-primary border-primary" style="text-align:center"><small style="color:white" class="">Time Remaining</small></div-->
                    </div>'
;
        }
        
$cmd    =    "whosip $remoteaddr";
        
$output    =    shell_exec($cmd);
        
$convert_to_array explode("\n"$output);
        for(
$i=0$i count($convert_to_array ); $i++){
            
$key_value explode(':'$convert_to_array [$i]);
            if(
sizeof($key_value)!=1)    {    $end_array[$key_value [0]] = $key_value [1];    }
        }
        
$NetworkName= @$end_array["Network Name"];
        
$OwnerName    = @$end_array["Owner Name"];
        
$CIDR        = @$end_array["CIDR"];
        if(
$NetworkName!=""){
            echo    
'<div class="card border-danger mb-5" style="text-align:center">
                        <div class="card-header bg-danger">'
;
            echo    
"        <h3 class=\"panel-title\"><a data-toggle=\"collapse\" href=\"#collapse05\">IP WhoIs</a></h3>";
            echo    
'    </div>
                        <div class="card-body text-danger">
                            <h6 class="card-text" style="text-align:center" id="ns">WhoIS</h6>'
;
            echo    
"        <div id=\"collapse05\" class=\"panel-collapse expand\">";        ### Start Colapsible Panel, this and the TWO line above.
            
echo    "            <div class=\"panel-body\">\n";
            echo    
"Network Name: <code>$NetworkName</code>    <br>    Owner Name: <kbd>$OwnerName</kbd>    <br>    CIDR: $CIDR    <br>";
            echo    
"        </div></div>";
            echo    
'    </div>
                        <!--div class="card-footer bg-danger border-danger" style="text-align:center"><small style="color:white" class="">Time Remaining</small></div-->
                    </div>'
;
//            echo    "\n<p style=\"background-color:#d9d6f9\"><b style='color:blue'>$cmd</b><div>";
//            print_r($end_array);
//            echo    "</div><!--$output--></p>\n";
        
}
    }
##--
##--

##-
##-
##
    
echo    '<div class="card border-secondary mb-5" style="text-align:center">
                <div class="text-black bg-secondary card-header">'
;
    echo    
"        <h3 class=\"panel-title\"><a data-toggle=\"collapse\" href=\"#collapseJS\">JavaScript</a></h3>";
    echo    
'    </div>
                <div class="card-body text-secondary">
                    <h6 class="card-text" style="text-align:center" id="ns">Click above to open</h6>'
;
    
JS();
    echo    
'    </div>
                <!--div class="card-footer bg-Secondary border-Secondary" style="text-align:center"><small style="color:white" class="">Time Remaining</small></div-->
            </div>'
;
##
    
echo    "</div>";
        
##    echo    "<hr>";            
}
##
##    START / STOP
##
else{
    echo    
'<div class="container-fluid">';
    echo    
"<h1>$program</h1>";

        
//    var_dump($_SERVER);
        //    var_dump($_ENV);

##    echo    "\n\t    <div class=\"card-deck\">";
    
echo    "\n\t    <div class=\"card-columns\">";
//    echo    "\n\t    </div><div class=\"card-columns\">";
    
echo    '
            <div class="card border-dark mb-5" style="text-align:center">
                <div class="text-black bg-dark card-header">'
;

##    $program    ##

    
echo    "<h3 class=\"panel-title\"><a data-toggle=\"collapse\" href=\"#collapse00\">$program</a></h3>\n";
    echo        
'</div>
                <div class="card-body text-dark">
                    <h6 class="card-text" style="text-align:center" id="ns"></h6>
            '
;
    echo    
"    <div id=\"collapse00\" class=\"panel-collapse collapse\">";        ### Start Colapsible Panel, this and the TWO line above.
    
echo    "<div class=\"panel-body\">\n";
    echo    
"<b>Version:</b>    <kbd>$version</kbd>";
    echo    
"</div></div>";
    echo    
'
                </div>
                <!--div class="card-footer bg-dark border-dark" style="text-align:center"><small style="color:white" class="">Time Remaining</small></div-->
            </div>'
;
    echo    
'
            <div class="card border-success mb-5" style="text-align:center">
                <div class="text-black bg-success card-header">'
;

##    $servername    ##

    
echo    "<h3 class=\"panel-title\"><a data-toggle=\"collapse\" href=\"#collapse000\">$servername</a></h3>\n";
    echo    
'</div>
                <div class="card-body text-success">
                    <h6 class="card-text" style="text-align:center" id="ns"></h6>
            '
;
    
DSName();
    echo    
'
                </div>
                <!--div class="card-footer bg-success border-success" style="text-align:center"><small style="color:white" class="">Time Remaining</small></div-->
            </div>'
;
    echo    
'
            <div class="card border-warning mb-5" style="text-align:center">
                <div class="text-black bg-warning card-header">'
;

##    HTTP    ###    ##

    
echo    "<h3 class=\"panel-title\"><a data-toggle=\"collapse\" href=\"#collapse1\">HTTP/s</a></h3>\n";
    echo    
'</div>
                <div class="card-body text-warning">
                    <h6 class="card-text" style="text-align:center" id="ns"></h6>
            '
;
    
HTTP();
    echo    
'
                </div>
                <!--div class="card-footer bg-warning border-warning" style="text-align:center"><small style="color:white" class="">Time Remaining</small></div-->
            </div>'
;
    echo    
'
            <div class="card border-primary mb-5" style="text-align:center">
                <div class="text-black bg-primary card-header">'
;

##    Date/Time    ##

    
echo    "<h3 class=\"panel-title\"><a data-toggle=\"collapse\" href=\"#collapse7\">Date/Time</a></h3>";
    echo    
'</div>
                <div class="card-body text-primary">
                    <h6 class="card-text" style="text-align:center" id="ns"></h6>
            '
;
    
DateTime();
    echo    
'
                </div>
                <!--div class="card-footer bg-primary border-primary" style="text-align:center"><small style="color:white" class="">Time Remaining</small></div-->
            </div>'
;
    echo    
'
            <div class="card border-danger mb-5" style="text-align:center">
                <div class="text-black bg-danger card-header">'
;

##    Cookies    ###    ##

    
echo    "<h3 class=\"panel-title\"><a data-toggle=\"collapse\" href=\"#collapse8\">Cookies</a></h3>";
    echo    
'</div>
                <div class="card-body text-danger">
                    <h6 class="card-text" style="text-align:center" id="ns"></h6>
            '
;
    
Cookies();
    echo    
'
                </div>
                <!--div class="card-footer bg-danger border-danger" style="text-align:center"><small style="color:white" class="">Time Remaining</small></div-->
            </div>'
;
#    echo    "\n\t    </div><div class=\"card-deck\">";
    
echo    '
            <div class="card border-secondary mb-5" style="text-align:center">
                <div class="text-black bg-secondary card-header">'
;

##    Remote & Local    ##

    
echo    "<h3 class=\"panel-title\"><a data-toggle=\"collapse\" href=\"#collapse2\">Remote &amp; Local</a></h3>";
    echo    
'</div>
                <div class="card-body text-secondary">
                    <h6 class="card-text" style="text-align:center" id="ns"></h6>
            '
;
    
RemoteLocal();
    echo    
'
                </div>
                <!--div class="card-footer bg-secondary border-secondary" style="text-align:center"><small style="color:white" class="">Time Remaining</small></div-->
            </div>'
;
    echo    
'
            <div class="card border-secondary mb-5" style="text-align:center">
                <div class="text-black bg-secondary card-header">'
;

##    NS Info    ###    ##

    
echo    "<h3 class=\"panel-title\"><a data-toggle=\"collapse\" href=\"#collapse9\">NS Info</a></h3>";
    echo    
'</div>
                <div class="card-body text-secondary">
                    <h6 class="card-text" style="text-align:center" id="ns"></h6>
            '
;
    
NS();
    echo    
'
                </div>
                <!--div class="card-footer bg-secondary border-secondary" style="text-align:center"><small style="color:white" class="">Time Remaining</small></div-->
            </div>'
;
    echo    
'
            <div class="card border-secondary mb-5" style="text-align:center">
                <div class="text-black bg-secondary card-header">'
;

##    JavaScript    ##

    
echo    "<h3 class=\"panel-title\"><a data-toggle=\"collapse\" href=\"#collapseJS\">JavaScript</a></h3>";
    echo    
'</div>
                <div class="card-body text-secondary">
                    <h6 class="card-text" style="text-align:center" id="ns"></h6>
            '
;
    
JS();
    echo    
'
                </div>
                <!--div class="card-footer bg-Secondary border-Secondary" style="text-align:center"><small style="color:white" class="">Time Remaining</small></div-->
            </div>'
;
    echo    
'
            <div class="card border-info mb-5" style="text-align:center">
                <div class="text-black bg-info card-header">'
;
    echo    
"<h3 class=\"panel-title\"><a data-toggle=\"collapse\" href=\"#collapse3\">System</a></h3>";
    echo    
'</div>
                <div class="card-body text-info">
                    <h6 class="card-text" style="text-align:center" id="ns"></h6>
            '
;
##    System    ###    ##

    
Sys();
    echo    
'
                </div>
                <!--div class="card-footer bg-info border-info" style="text-align:center"><small style="color:white" class="">Time Remaining</small></div-->
            </div>'
;
    echo    
'
            <div class="card border-info mb-5" style="text-align:center">
                <div class="text-black bg-info card-header">'
;

##    Website    ###    ##

    
echo    "<h3 class=\"panel-title\"><a data-toggle=\"collapse\" href=\"#collapse4\">Website</a></h3>";
    echo    
'</div>
                <div class="card-body text-info">
                    <h6 class="card-text" style="text-align:center" id="ns"></h6>
            '
;
    
Website();
    echo    
'
                </div>
                <!--div class="card-footer bg-info border-info" style="text-align:center"><small style="color:white" class="">Time Remaining</small></div-->
            </div>'
;
#    echo    "\n\t    </div><div class=\"card-deck\">";
    
echo    '
            <div class="card border-info mb-5" style="text-align:center">
                <div class="text-black bg-info card-header">'
;

##    $_SERVER    ##

    
echo    "<h3 class=\"panel-title\"><a data-toggle=\"collapse\" href=\"#collapse5\">\$_SERVER</a></h3>";
    echo    
'</div>
                <div class="card-body text-info">
                    <h6 class="card-text" style="text-align:center" id="ns"></h6>
            '
;
    
Server();
    echo    
'
                </div>
                <!--div class="card-footer bg-info border-info" style="text-align:center"><small style="color:white" class="">Time Remaining</small></div-->
            </div>'
;
    echo    
'
            <div class="card border-info mb-5" style="text-align:center">
                <div class="text-black bg-info card-header">'
;

##    $_ENV    ###    ##

    
echo    "<h3 class=\"panel-title\"><a data-toggle=\"collapse\" href=\"#collapse6\">\$_ENV</a></h3>";
    echo    
'</div>
                <div class="card-body text-info">
                    <h6 class="card-text" style="text-align:center" id="ns"></h6>
            '
;
    
EnvVars();
    echo    
'
                </div>
                <!--div class="card-footer bg-info border-info" style="text-align:center"><small style="color:white" class="">Time Remaining</small></div-->
            </div>'
;
#    echo    "\n\t    </div><div class=\"card-deck\">";

    
echo    "\n    </div>\n\n";
}

    include(
'copyright.php');

//    echo "<pre>";

//    print_r(@$_SERVER);
//    echo "</pre>";

//    echo    'php_sapi_name:'.php_sapi_name()."<br>";

//    echo "Services: | ";
//    $services = array('http', 'ftp', 'ssh', 'telnet', 'imap', 'smtp', 'nicname', 'gopher', 'finger', 'pop3', 'www');
//    foreach ($services as $service) {    $port = getservbyname($service, 'tcp');    echo $service . ": " . $port . " | \n";    }

//    echo "\n</div>\n";

/*
    echo    "\n<div class=\"panel panel-default\">";
    echo    "    <div class=\"panel-heading\">Panel<h3 class=\"panel-title\">Panel title</h3></div>";
    echo    "    <div class=\"panel-body\">";
    echo    "        Panel content";
    echo    "    </div>";
#    echo    "    <div class=\"panel-footer\">Panel footer</div>";
    echo    "</div>";
*/

    ####    END of PAGE        ####

//  echo "\n<address>&copy;$year</address>    \t\t\t\t\t    <! ===  Copyright  === !>\n";

/* SSL Cert Check */

if($QueryString=="SSLCheck")    {    
    if(
$fp tmpfile())
    {
        
$ch curl_init();
        
$curl="https://".$httphost;
        
curl_setopt($chCURLOPT_URL,$curl);
        
curl_setopt($chCURLOPT_RETURNTRANSFER1);
        
curl_setopt($chCURLOPT_CONNECTTIMEOUT5);
        
curl_setopt($chCURLOPT_TIMEOUT5);
        
curl_setopt($chCURLOPT_STDERR$fp);
        
curl_setopt($chCURLOPT_CERTINFO1);
        
curl_setopt($chCURLOPT_VERBOSE1);
        
curl_setopt($chCURLOPT_HEADER1);
        
curl_setopt($chCURLOPT_NOBODY1);
        
curl_setopt($chCURLOPT_SSL_VERIFYPEERfalse);
        
curl_setopt($chCURLOPT_SSL_VERIFYHOST,  2);
        
$result curl_exec($ch);
        
$httpcode curl_getinfo($chCURLINFO_HTTP_CODE);
        
$certinfo curl_getinfo($chCURLINFO_CERTINFO);
        echo 
"<pre>";
        
print_r($certinfo);
        echo 
"</pre>";
        
curl_errno($ch)==or die("Error:".curl_errno($ch)." ".curl_error($ch));
        
fseek($fp0);//rewind
        
$str='';
        while(
strlen($str.=fread($fp,8192))==8192);
        echo 
"<pre>".$str."</pre>";
        
curl_close($ch);
        
fclose($fp);
        echo 
$httpcode;
    }    
}

    include(
'footer.php');

    
####    END of HTML        ####

    
echo "\n</div></body></html>    \t\t\t\t\t\t        <! === End of File === !>";
?>