Getting Server status and counting connected players

Is there any way to get a server status (running or not) and the count of connected players to that server from outside the server (like being at servers menu) if I have the IP. I want to achieve a servers list where you can see the active servers and see the count of connected players for each server and choose from there which server to connect to, I have a database where I created a table and stored into it ths servers IP and port when players create them, I want a way to tell when the server goes offline so I delete it from the database and I want a way to count the connected players on each server when its running. Please help me its been a week for me searching the documentations. Thanks in advance :slight_smile: