Skip to content

Portchecker is a simple JS/PHP/HTML webapp which checks ports to display the status of a server.

License

Notifications You must be signed in to change notification settings

ssitaru/portchecker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

portchecker - a simple portchecking webapp

portchecker enables you to simply check your server's vitals based on simple PHP backend and a HTML/JS frontend

a (hopefully) live example is available at http://www.sitaru.eu/heartbeat

installation

should be straightforward:

  • clone the repo/download

  • move to your webroot/status or similar

  • in the root folder of portchecker:

      touch .lastrequest
    
  • then edit js/main.js to point to your check.php relative to your webroot (the '/heartbeat/check.php' part)

  • adjust the services at the top of js/main.js (syntax is JSON)

frontend

the frontend is a simple HTML page, some css and some jQuery JS code which sends out AJAX requests to the backend.

backend

check.php is the main backend. it does the following:

  • check if .lastrequest timestamp is minimum 1s back in time (to prevent spamming)
  • do a fsockopen() on the requested port
  • reply in JSON like this: {'result': true/false, 'port':'open/closed'} and an optional error message

About

Portchecker is a simple JS/PHP/HTML webapp which checks ports to display the status of a server.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published