i need to take the result of a javascript script, make it equal to a php varible, fopen, fwrite, fclose
let's say: <?php $yahoo = "?> <script>alert(document.cookie)</script> <? "
it would take the writing, not the cookie result. instead of an alert popup, the result will be written onto the index.html. i need to get that to be hidden and instead, written into a txt file.
so my tasks will run silently, as when the person visits, it executes the javascript, takes the result, writes it to a .txt, and the user never knows this happens or sees the index.html change in any way
anyone know how to do such a thing? thanks
if there is a way to do this all in javascript, could be better, but i prefer php. none the less, tell me the code on how to do it in javascript, if possible.
let's say: <?php $yahoo = "?> <script>alert(document.cookie)</script> <? "
it would take the writing, not the cookie result. instead of an alert popup, the result will be written onto the index.html. i need to get that to be hidden and instead, written into a txt file.
so my tasks will run silently, as when the person visits, it executes the javascript, takes the result, writes it to a .txt, and the user never knows this happens or sees the index.html change in any way
anyone know how to do such a thing? thanks

if there is a way to do this all in javascript, could be better, but i prefer php. none the less, tell me the code on how to do it in javascript, if possible.