Note that there are some explanatory texts on larger screens.

plurals
  1. POExecute a Local File Through Javascript/PHP
    text
    copied!<p>Ok, so first of all, I realize that executing a local file through JavaScript is not possible. Second, I realize that the ability to execute a local file from a webpage is extremely dangerous, and that this question probably looks sketchy. However, my research has shown that it is indeed possible to execute files in the local system without the user realizing using JS by calling the PHP function exec() through AJAX.</p> <p>Now before I go on, let me just say that I have no intention of using this in a dangerous way. I actually need this for my senior neuroscience/computer science thesis in which I'm:</p> <ul> <li><p>Working with a wireless brainwave monitoring headset .</p></li> <li><p>I need to sync clicks on webpages to event markers on another computer that's monitoring the brainwaves. </p></li> <li><p>I need to do this without it bothering the user or asking for permission over and over, in the background so as not to interrupt the experiment.</p></li> </ul> <p>I am currently planning on doing this by writing a Chrome extension which injects a script onto selected pages, selects the element I want, then runs the function on click from there using AJAX.</p> <p>So here are my questions:</p> <ol> <li><p>I'm not super familiar with AJAX and PHP. What is the most straightforward way to set it up so that Javascript calls a PHP file on a click event?</p></li> <li><p>Does anyone know of a web hosting company that does not have the exec() function disabled? I know this sounds sketchy, but I really need this to complete my thesis.</p></li> </ol> <p>Thanks so much!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload