This website is really just for amusement. But the posted data sent by ajax isn't getting received as when I click the button. it doesn't work.
<?php
$recieved = $_POST["started"];
if ($recieved == "TRUE") {
echo 'pinging: ' . $_SERVER["REMOTE_ADDR"];
sleep(.2);
echo 'pinging local k3wlk1d servers';
sleep(.2);
echo 'executing terminal...';
sleep(.2);
echo 'cmd.execute:: settime 01012014';
sleep(.2);
echo 'cmd.execute:: ping 127.0.0.1';
sleep(.2);
echo 'cmd.execute:: getfiles(k3wlk1d.server, 127.0.0.1, xmlhttprequest=true)';
sleep(.2);
echo 'secure connection established';
sleep(.2);
echo 'sending to old kewlkids site...';
}
?>
<!DOCTYPE html>
<link rel="stylesheet" href="timemachine.css">
<html lang="en">
<head>
<meta charset="utf-8" />
<title>K3WLK1DZ TIME MACHINE</title>
</head>
<body>
<font color="red">This is an experimental time machine that will send you back to the old k3wlk1dz page. Press the button to continue.</font>
<button class="btn" onclick="ajaxstart()">Start</button>
<p id="return"></p>
<script>
function ajaxstart() { /*
wait
WAIT
why am i using ajax
oh wait
i need to contact the server for... something. I forgot.
Darn.
ok
*/
var xmlhttp;
if (window.XMLHttpRequest) {
//for ie 7, firefox, chrome, opera, safari, and *POSSIBLY* microsoft edge
xmlhttp = new XMLHttpRequest();
} else {
xmlhttp = new ActiveXObject("Microsoft.XMLHttp");
}
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
/* english translation: if http request is successful, run this block of code*/
var ret = document.getElementById("return");
ret.innerHTML = xmlhttp.responseText;
}
xmlhttp.open("POST", "timemachine.php", true);
xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xmlhttp.send("started=TRUE");
}
}
</script>
</body>
</html>