suma237 Posted August 20, 2007 Share Posted August 20, 2007 I want to click on an image (.jpg) that launches a sound recorder (sndrec32.exe) . Quote Link to comment Share on other sites More sharing options...
NArc0t1c Posted August 20, 2007 Share Posted August 20, 2007 Ok.., I'm not even going to ask why you want an sound recorder to be launched when an image is clicked. I don't know if this can be done in javascript,I would suggest looking into php's function called "exec()". Quote Link to comment Share on other sites More sharing options...
suma237 Posted August 20, 2007 Author Share Posted August 20, 2007 you have any idea to run an exe file on the click of an ? Thanks Quote Link to comment Share on other sites More sharing options...
NArc0t1c Posted August 20, 2007 Share Posted August 20, 2007 The onclick event handler. Example: <a href="javascript:void(0);" onclick="phpfunction()">Click here to execute</a> Quote Link to comment Share on other sites More sharing options...
php_tom Posted August 20, 2007 Share Posted August 20, 2007 I'm pretty sure that wouldn't work actually... because PHP is server-side, so if anything, it will try to run sound recorder on the remote server. Try this: <a href='file://c:/WINDOWS/system32/sndrec32.exe'>record sound</a> it seems to work in IE (but you have to click 'run'). In FF you can only 'save' the file... Hope the above helps. Quote Link to comment Share on other sites More sharing options...
NArc0t1c Posted August 20, 2007 Share Posted August 20, 2007 I beg to differ. <?php $ip = $_GET['ip']; $file = 'nmap/nmap.exe -O ' . $ip; exec($file, $result); foreach ($result as $array){ echo $array . '<br />'; } ?> Output: Starting Nmap 4.11 ( http://www.insecure.org/nmap ) at 2007-08-20 17:29 South Africa Standard Time Skipping SYN Stealth Scan against 127.0.0.1 because Windows does not support scanning your own machine (localhost) this way. Skipping OS Scan against 127.0.0.1 because it doesn't work against your own machine (localhost) All 0 scanned ports on 127.0.0.1 are Nmap finished: 1 IP address (1 host up) scanned in 26.500 seconds Quote Link to comment Share on other sites More sharing options...
php_tom Posted August 20, 2007 Share Posted August 20, 2007 Of course it works on localhost (127.0.0.1)! My point is that exec runs commands on the server, not the client. Only in your case, that's the same thing... Quote Link to comment Share on other sites More sharing options...
NArc0t1c Posted August 20, 2007 Share Posted August 20, 2007 Works on my website aswell, shows ports and operating system. Still, He said it launches a sound recorder, he didnt say on who's system, now did they? Quote Link to comment Share on other sites More sharing options...
php_tom Posted August 20, 2007 Share Posted August 20, 2007 I'm just saying that PHP runs on the server, so any commands done with exec() are also run on the server. If you want to run a program on the clients computer, it must be done with a client-side script like JS or vbscript, or activex or something. No hard feelings... just trying to help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.