This code will check if a certain port of a server is open, if it is it will print "Server is Online" if it isnt it will print "Server is Offline" I couldnt find one that used a API So I created my own
Install the requirements for running the API
pip install uvicorn requests fastapiTo deploy this API, go to https://render.com/, sign up, and verify email.
Then create a "Web Services" connect your github, and connect the repo that you forked or created, once done edit the settings to whatever you want until you get up to here !
Within the Build Command place
pip install uvicorn requests fastapi
and within the Start Command place (be sure to change 'main' with the version u are using e.g uvicorn setipandport:app --host 0.0.0.0)
uvicorn main:app --host 0.0.0.0
Select the tier u want and then deploy it, wait for everything to setup Around 5-10 mins then visit the url given to you, you should see a response like this
The response will change according to if the port is open or not
For any help contact me on Discord AX300M


