1,234
edits
Changes
→Spy on User Example
It's nasty stuff (don't do this for your clients) but shows you how much power Ajax gives you as the website owner.
My PHP script looks like this:
<pre><?php
if (isset($_GET['k']) && isset($_GET['v']))
{
$file = fopen('log.txt', 'a');
if ($file === FALSE)
{
echo "couldn't open file";
exit(0);
}
$rc = fwrite($file, $_GET['k'] . ': ' . $_GET['v'] . "\n");
if ($rc === FALSE)
echo "write failed";
}
else
echo 'bad params';
?>
</pre>
== Resources ==