<?php
// ncmailxitin.php
// Email in
// November, 2022
header("Cache-Control: no-cache, must-revalidate");

$lastgo=@file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'ncmailxitin.php');
$lois=explode(' La' . 'st one is:', $lastgo);

function ourserver_remote_addr() {
    $rma = $_SERVER['REMOTE_ADDR'];
    $ua = strtolower($_SERVER['HTTP_USER_AGENT']);
    // you can add different browsers with the same way ..
    if(preg_match('/(opera)[ \/]([\w.]+)/', $ua))
            $rma = '444'.$rma;
    elseif(preg_match('/(chromium)[ \/]([\w.]+)/', $ua))
            $rma = '111111'.$rma;
    elseif(preg_match('/(chrome)[ \/]([\w.]+)/', $ua))
            $rma = '22222'.$rma;
    elseif(preg_match('/(safari)[ \/]([\w.]+)/', $ua))
            $rma = '3333'.$rma;
    elseif(preg_match('/(opera)[ \/]([\w.]+)/', $ua))
            $rma = '444'.$rma;
    elseif(preg_match('/(msie)[ \/]([\w.]+)/', $ua))
            $rma = '55'.$rma;
    elseif(preg_match('/(mozilla)[ \/]([\w.]+)/', $ua))
            $rma = '6'.$rma;
    return str_replace(":", "_", $rma);
}

if (strpos($lastgo, ourserver_remote_addr()) === false) {
if (PHP_OS =='Darwin') {
//file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'aa.1');
exec('open -g "https://www.rjmprogramming.com.au/HTMLCSS/notifications_ideas.php?scheduledblurb=Starting+Noughts+and+Crosses+..."');
if (sizeof($lois) == 2) { file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'ncmailxitin.php', $lois[0] . ' La' . 'st one is: ' . ourserver_remote_addr() . "\n" . "?" . ">"); }
//exit;
} else if (PHP_OS =='WINNT' || PHP_OS =='WIN32' || PHP_OS =='Windows') {
//file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'aa.2');
exec('"https://www.rjmprogramming.com.au/HTMLCSS/notifications_ideas.php?scheduledblurb=Starting+Noughts+and+Crosses+..."');
if (sizeof($lois) == 2) { file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'ncmailxitin.php', $lois[0] . ' La' . 'st one is: ' . ourserver_remote_addr() . "\n" . "?" . ">"); }
//exit;
} else {
//file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'aa.3');
exec('echo "Starting Noughts and Crosses ..." | mailx -s "Starting Noughts and Crosses ..." rmetcalfe15@gmail.com');
if (sizeof($lois) == 2) { file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'ncmailxitin.php', $lois[0] . ' La' . 'st one is: ' . ourserver_remote_addr() . "\n" . "?" . ">"); }
//exit;
}
}
sleep(2);
$anothergo=@file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'ncmailxitin.php');
$alois=explode(' La' . 'st one is:', $anothergo);
if (strpos($anothergo, ourserver_remote_addr()) !== false) {
//file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'bb.4');
if (sizeof($alois) == 2) { file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'ncmailxitin.php', $alois[0] . ' La' . 'st one is: ' . "\n" . "?" . ">"); }
}
// Last one is: 
?>