Jump to content

Hi,

I would like to create a webpage that can open a .bat file on the server.

 

I got the idea from VPS hosting, where you can turn on and off servers from your browser

i would like something similar, that “double click” on a .bat

 

on Google I find only scripts that are running thru ActiveX or other deprecated softwares which I don’t want to use…

 

Any idea ?

Link to comment
https://linustechtips.com/topic/1510699-open-program-from-a-webpage/
Share on other sites

Link to post
Share on other sites

30 minutes ago, Hanscento said:

I would like to create a webpage that can open a .bat file on the server.

What server? The server hosting the page?

PHP can do this, using exec() to call external programs you can execute scripts on the server-side to shut it down, perform reboots or other tasks.

Needless to say, exec() is insecure if you trust it with any external input.

Link to post
Share on other sites

31 minutes ago, Mojo-Jojo said:

What server? The server hosting the page?

Yes.

 

31 minutes ago, Mojo-Jojo said:

PHP can do this, using exec() to call external programs you can execute scripts on the server-side to shut it down, perform reboots or other tasks.

Needless to say, exec() is insecure if you trust it with any external input.

Ok i'll give it a try

Link to post
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×