If you mean a txt file on your server, this actually depends on your server-side script which will do the work of receiving the AJAX call and saving the value it gets onto the server's hard drive.
As such, it depends on the language used and is out of the scope of Construct 2 itself.