Jump to content

Web page tests SQL server state


Zath
 Share

Recommended Posts

I host an online game.

To connect to that game, the user runs the client which uses an IP address to find the server and then user entry of id and password to gain access to the next part of the game.

The ID and password are held on an MS SQL 2012 SQL table. The server itself uses ODBC.

 

I would like to have a web page that displays "Server online" or "Server Offline". This info would be gained when a visitor sees the web page.

 

I've seen it done elsewhere with javascript.

Is there a way to create a php code or javascript (or other) that will be able to try and connect to the SQL table and server using a hidden server side Id and password and display the results ?

 

Perhaps I'm not looking at this the right way.

Can anyone advise me please ?

Link to comment
Share on other sites

Is there a way to create a php code or javascript (or other) that will be able to try and connect to the SQL table and server using a hidden server side Id and password and display the results ?

I don't see a reason why you wouldn't be able to do something like that. You could create a database user with extremely limited privileges, essentially nothing, so that even if someone figures out the credentials they wouldn't be able to do anything if they manage to log in.
Link to comment
Share on other sites

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
 Share

×
×
  • Create New...