Hosting edition
WHMCS module
Set up stations automatically from WHMCS orders, with suspension, plan changes and monthly bandwidth usage.
The WHMCS server module talks to the Hosting edition's provisioning API. WHMCS creates, suspends and removes stations as orders and invoices change, and imports each station's monthly transfer for billing.
Install#
Copy the module folder modules/servers/lurcast into your WHMCS installation's modules/servers/ directory, so that you end up with modules/servers/lurcast/lurcast.php. If you do not have the module, ask info@lurcast.com.
Add the server#
In WHMCS, add a server:
| Field | Value |
|---|---|
| Module | Lurcast Hosting |
| Hostname | Your Lurcast host, for example radio.example |
| Port | The port the API is served on. Defaults to 8000, or 8443 with Secure. |
| Secure | Tick it if the API is served over HTTPS. |
| Access Hash | Your hosting.api_token. The Password field also works. |
Create a product#
Create a product that uses the Lurcast Hosting server module and set its options:
| Option | Default | Notes |
|---|---|---|
| Max listeners | 100 |
Concurrent listeners. 0 means no limit. |
| Max bitrate (kbps) | 128 |
Highest source bitrate. 0 means no limit. |
| Monthly transfer (GB) | 0 |
Listener traffic per calendar month. 0 means no limit. |
Then enable Update usage statistics for the server, so WHMCS imports each station's monthly transfer.
How services map to stations#
- Each service becomes the station
whmcs-<service id>. - Its mount is
/<username>when the service has a username, otherwise/whmcs-<service id>. - The service password is the station's source password and its dashboard password, so it must be at least 8 characters.
Your customer then points an Icecast-compatible encoder at the server with that mount, username source and the service password. They sign in to the dashboard at /admin/ with the station ID (whmcs-<service id>) and the same password.
What the module does#
| WHMCS action | On the server |
|---|---|
| Create | Creates the station with the product's limits. |
| Suspend | Suspends the station and disconnects its source and listeners. |
| Unsuspend | Allows connections again. |
| Terminate | Deletes the station. |
| Change password | Sets a new source and dashboard password. |
| Change package | Applies the new product's limits. |
| Usage update | Imports the month's transfer. |
Test Connection on the server checks the hostname, port and token. The module also adds a service tab in the WHMCS admin area, and a client area page that shows your customer the listen URL, whether the station is live, the current song, listeners, this month's transfer, the encoder settings (server, port, mount and username), and the dashboard address and username.
Plan limits#
Each station counts against your license's station limit. If WHMCS tries to create a station past the limit, the API answers 403 and the module reports the error. See Licensing and renewal.