# File ajax.js
# File: write.php
$event = $_GET['event'];
if ($event == 1)
{
$txt = 'log1.txt'
}
else
{
$txt = 'log2.txt';
}
if (file_exists($txt))
{
$fh = fopen($txt, 'w') or exit;
$data = file($txt)
$add = 1 + $data[0];
fwrite($fh, $add);
fclose($fh);
}
?>
# File: landingPage.html