Jump to content

System Stats Widget


Recommended Posts

Some time ago myself and another user made a nice little sidebar widget (before WHMCS released there widgets) that would show all the stats of your WHMCS somewhere on your website by including a PHP file.

 

original Thread : http://forum.whmcs.com/showthread.php?t=30936

 

Now with the arrival of the WHMCS Widgets script i did some conversion and made the all new System Stats Widget.

 

Very simple and easy to use :

 

Include the following somewhere on your website

 

This will show the total amount of registered domains in your system

<script language="javascript" src="http://yourwhmcsdomain.tld/widgets/systemstats.php?type=domains"></script>

 

This will show the total amount of a specific TLD registered in your system. (EG .it)

<script language="javascript" src="http://yourwhmcsdomain.tld/widgets/systemstats.php?type=domains&tld=it"></script>

 

This will show the total amount of bandwidth used by all your servers

<script language="javascript" src="http://yourwhmcsdomain.tld/widgets/systemstats.php?type=bandwidth"></script>

 

This will show the total amount of webspace used by all your servers

<script language="http://yourwhmcsdomain.tld/javascript" src="widgets/systemstats.php?type=webspace"></script>

 

This will show the total amount of hosting accounts in your system

<script language="javascript" src="http://yourwhmcsdomain.tld/widgets/systemstats.php?type=hosting"></script>

 

I will be adding more variables to this at some point but at the moment I think this is a good start.

 

I hope you all enjoy.

 

Ciao

SystemStats1.0RC1.zip

Edited by Milliment
Title was wrong
Link to comment
Share on other sites

Suggestion :)

Add the following to show the number of reseller servers, and the number of dedicated servers :)

 

<script language="javascript" src="http://yourwhmcsdomain.tld/widgets/systemstats.php?type=reseller"></script>

 

<script language="javascript" src="http://yourwhmcsdomain.tld/widgets/systemstats.php?type=dedicated"></script>

Link to comment
Share on other sites

Thanks for the input, i will implement the sanatizer and do an update to also include reseller information and also include "this week", "this month" and "this Year" information, Total clients, Total Dedicated and VPS servers and maybe some module specific information as well.

 

Have fun.

Link to comment
Share on other sites

Just done a quick update to the widget

 

Change Logs

 

1.0RC2

- Added Escape string to prevent Database Injection

- Added Service Type variable to show specific hosting types.

- Set all Querys to show "Active" Products and Services

 

This will show the total amount of a specific hosting accounts in your system

 

**Available Variables**

 

hostingaccount

server

reselleraccount

other

 

<script language="javascript" src="http://yourwhmcsdomain.tld/widgets/systemstats.php?type=hosting&st=hostingaccount"></script>

SystemStats1.0RC2.zip

Link to comment
Share on other sites

I am wondering what other information i should include in this plugin. i personally am thinking some of the following information would be a good idea :

 

server module based accounts count

Custom Output Names(For multi language support *Default will be english if not set*)

Number of Registered accounts total and by country, possibly by user groups.

 

Also i am thinking daily, monthly and yearly counts for services.

 

If you have anything else please let me know.

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated