Hi guys, basically my current situation is that the client will need to run the audit services batch file from the web server. I would like it to output the service result of the client side because i want to audit the client side and not the web server side. I have a method which is using Force Downloading but however, my project requires me to auto run the batch file when the user saves the script....how do i go about doing that? <?PHP // Define the path to file $file = '4.4_File_Permission.bat'; if(!file) { // File doesn't exist, output error die('file not found'); } else { // Set headers header("Cache-Control: public"); header("Content-Description: File Transfer"); header("Content-Disposition: attachment; filename=$file"); header("Content-Type: application/bat"); header("Content-Transfer-Encoding: ASCII"); // Read the file from disk readfile($file); } ?> PHP:
I was a little confuse when you mentioned "client side" - I think you got the naming convention wrong because PHP is not client side. You seem to want this script to run on your client's server and you want to auto run this script. You need to tell your client that he/she needs to learn CRON jobs because that's what most people usually use to auto-run scripts. What are you trying to accomplish with this script anyway?
Okay basically i am doing a project which is web-based windows auditing. Users/Clients will access the web server in order to download the various audit batch scripts. Right now, users can download the batch scripts but the browser only prompts it to save the script. I need to find a way whereby the batch scripts will be saved and auto-executed in order to provide user-friendliness..
Agreed on the ActiveX method. If you know the admins at the site they could probably put a run call to your script when user logs in as a back up option
Hmm if i use Javascript with ActiveX components integrated into it, can the audit batch scipt be called from the web server to the computer client and be executed?