Registrations are done automatically. To add or update an entry, you will have to send following HTTP request to /heartbeat.php (an example):
https://81net.duckdns.org/netlist/heartbeat.php?
action=heartbeat&
name=Example%20Server&
description=An%20example%20server.&
address=192.168.1.100&
port=8080&
software=Apache&
protocol=HTTP/1.1&
is_public=true
The %20s are spaces in URL encoding. The HTTP request has to be sent without line breaks.
Each heartbeat request has its own parameters that control how the server is displayed on the list.
| Key | Description |
|---|---|
action |
This key is always required. Accepts heartbeat, list, info values.
heartbeat value is the default value for heartbeat request. Accepts parameters as listed above and below.
list gives you the server list in JSON format.
info gives status about a given server in the list.
|
name |
Defined server name displayed on the list. Required. |
description |
Can be a longer text describing the server, programmable. Optional. |
address |
Fundamental part of heartbeat request. Should give user destination IP address of the listed server. Can act as a bridge to other server. Required. |
port |
Second fundamental part of heartbeat request coming right next to the address parameter. Should give user destination port of the listed server that is listening to this port, or can act as a bridge to other server. Required, must be an integer number in range from 0 to 65565. |
software |
Name of server software the given server is running on. Optional. |
protocol |
Optional parameter, but can be useful. A name of the protocol model the given server supports. |
is_public |
Accepts true or false value. It can be used to hide the server from the server list, even when sending heartbeat request. |
Each key that accepts a string value, has its limits in characters. It's usually 16, 64 or 256. Don't use raw whitespaces and/or tabs, use valid URL encoding format.
Server registrations are valid for 60 seconds. To keep a registration active, the server must periodically send a heartbeat request containing the same registration parameters before the current entry expires.
A simple heartbeat library for PHP-driven servers is available.
DownloadAlso an example server written in PHP.
Download