PtokaX forum

Development Section => Your Developing Problems => Topic started by: bsalsa on 16 February, 2004, 17:06:05

Title: webstat/hubstat
Post by: bsalsa on 16 February, 2004, 17:06:05
i got the html files (of the layout) ready for use
how do i probe my hub and get my hubstat info into my web site ?
 so i can show in my site some details like :
ban users :
kick users :
total users in the hub :
total shared in the hub:

....


all the results should be in real time more or less ...
thanks
Title:
Post by: WooshMan on 04 March, 2004, 10:37:07
As far as I know, using the standard hub templates you cannot get informatino like that.

I started writing a cgi script to get such info from the hub running Channelbot 3.4, but is is currently on hold.
Link to posts I made (http://board.univ-angers.fr/thread.php?threadid=794&boardid=14&styleid=1&sid=d7e3a106ed5c413c2abebf3ce20e0540)

I am in the middle of writing a hub bot and one this is done I will then start on the cgi again.

I know that it can be done with Plop's AI bot, but I will make a stand alone hubstats bot which will have all the info you need in a format that is easy for the cgi to read.

Also, BlazexXx (I think) was doing one in php but had not stand alone bot.

If you want the cgi script and hubstats bot when finished, let me know and I will make it public.  it will be a complete re-write to the one for Channelbot.

Woosh
Title: sure
Post by: bsalsa on 07 March, 2004, 08:53:52
it will be a great help
i would love to have it please
regards
Title:
Post by: WooshMan on 07 March, 2004, 12:13:27
No Problem.

I will work on it sooner than later for you and anyone else who wants it.

Woosh
Title: New hubstats Webpage script
Post by: WooshMan on 14 March, 2004, 16:04:49
OK, well I have been working hard to bring version 1 of my huybstats / webpage scripts.

What the script actually does:

Lua script:

Creates a  current online users file and contains username, ip address and time / date connected

Creates a file for the cgi script to use.

When running, updates the online users file every x seconds.  x being what you specify.

Updates number of online users every x seconds.

cgi script:

Displays hub name and network name if hub is part of a network.

Shows all registered users for the hub in user level sections.  i.e. Ops, Vip's, regs etc.

Shows current online hub users - nick - ip and time connected.

Shows current online hub count.

Shows current hub status - online or offline

Shows perm banned users.

Options to change colours and text styles of web pages, options for always showing hub status and network name.

--------------------------------------------------------------------
The best way to see what this script and webpage does it to look at the running example:

Live webpage (//www.thelandofkaraoke.ath.cx/cgi-bin/hub.cgi)

I am after comments and suggestions.

Get the entire lua and cgi here will full instructions (http://www.thelandofkaraoke.ath.cx/downloads/hubwebstats.zip)

WooshMan
Title: Feed Back
Post by: WooshMan on 01 April, 2004, 11:25:39
Well the cgi and lua script for the hub webstats has been downloaded loads of times, but I have not had any feedback as yet...???

Is it being used?  Are there any additions / modifications needed?

Please give me an update as I would be interested to know if it is being used and where.

Cheers

Woosh
Title: hello
Post by: kbeh273300 on 26 April, 2004, 23:45:59
im useing it if you want to see it its at http://king.uknnet.com/cgi-bin/hub.cgi (http://king.uknnet.com/cgi-bin/hub.cgi)

i havent had much time to check it out much but it installed easy enough ,il give some feedback soon :)
Title:
Post by: bolamix on 27 April, 2004, 21:56:32
Hiya!
Useless feedback, but since i downloaded it: i don't have a web server or perl 5, and my pc is already overloaded..... so i won't use it, sorry :rolleyes:

Great idea tho  :))
Title:
Post by: kbeh273300 on 28 April, 2004, 00:04:19
ok some feed back here
#1 can we add a way of changeing text color?
#2 can we add a graph on say max users that were in the hub each day ?
#3 maybe add max share for each day aswell ?

thats all for now wouldnt want to make it to much of a resorce hog.
Title:
Post by: Event_Horizon on 29 April, 2004, 20:01:51
Looks nice...

a "back to top" button at the bottom of the page would be nice

and if possible a HTML version of this script would be much nicer :D for doods like me who run a simple HTML HP
Title:
Post by: [PT]CableGuy on 29 April, 2004, 20:39:59
HEY HEY HEY !!!!

What can i say ? THIS IS AWESOME S#!t !!!!!
Indeed , WooshMan  , "saved my life".  :]
It's almost as simple as PlugnPlay... :D
Very easy to configure the script and also the cgi .
I've never used or programed cgi before , but when i saw this....my brain clicked . 8o
I'm trying to run a hublist server and you're cgi helped allot !!!!
I use the cgi to "fetch" the publiclist.config file , that i upload to the server with Wincron.
So...it's also automatic :]  and now i have a webpage with dynamic hublist "values". :D
I'm so happy i could kiss you...don't get me wrong , i'm not gay !!!

The feedback is....EXCELENT STUFF  m8 !!!!

btw:  I use the cgi "inside" an html...

(hub.html)  


Lista Publica





Title: Feedback
Post by: WooshMan on 30 April, 2004, 16:13:15
Thanks for all the feed back guys. :-)

Right.... lets have a god at ansering some of them:-

1.  Back to Top button.  Will be done asap.

2.  HTML version.  Plops AI uses html to get the stats, but that is not stand alone as far as I know.  It is built into the bot.  I used cgi because that was by far the easiest way for me personally.  If anyone is willing to make an html version feel free.

2.  Text Colour - Yes no problem I will sort that out.

3.  Graphs - hmmm... now there is a nice idea, i will look into it.

4.  Hub Share Size per day, 1 week rolling, maybe 2 weeks.  I like that idea I will add that too.

Thanks for the link kbeh273300.

CableGuy - what can I say.. i am pleased to hear that it was so user friendly.

As I have had this much interest, I will work on it and make it more powerful and info friendly a possible.

Thanks again.

Woosh
Title:
Post by: plop on 01 May, 2004, 03:23:53
QuoteOriginally posted by WooshMan
2.  HTML version.  Plops AI uses html to get the stats, but that is not stand alone as far as I know.  It is built into the bot.  I used cgi because that was by far the easiest way for me personally.  If anyone is willing to make an html version feel free.
i'm using LHTML, or in full LUA HTML.
and yes it's not standalone, never made more then what can be called beta.
it's inside a.i. but really buggy.
2 run it you need apache 1.3.xx with the lua mod.

plop
Title:
Post by: kepp on 14 May, 2004, 01:42:15
i have no other words to say than HOLY CRAP THAT IS NICE!!

Keep it comming!!
Title:
Post by: WooshMan on 10 September, 2004, 00:45:36
Hi all,

Sorry I have not made any additions to the cgi hubstats script but since my baby was born I have not had time to crap let alone script.

I will try and make the additions as promised.

Thanks for the feedback guys.

Woosh :-)
Title:
Post by: jsjen on 24 September, 2004, 15:23:59
is there a way to get the actual hubshare to show on this aswell? or even each users share size?

AWSOME SCRIPT WHEN I finally got it going :p
Title:
Post by: MrBuitenhuizenJunior on 25 September, 2004, 06:35:16
This sript is great!
I load the 2 hub.cgi  files from 2 different hubs into a webpage ( http://www.buitenhuizen.org/hubstats/ )

MrBuitenhuizen
Title:
Post by: jsjen on 25 September, 2004, 11:17:46
Thats quite tricky :D
Title:
Post by: ((UKSN))shad_dow on 25 September, 2004, 23:07:05
dear all

heres a script ive been working on for a bit , basicaly its a webstats script , not as good as Wooshman`s but its for ppl with webspace on other severs that dont have cgi allso u need to have a vaild ftp account to ur webspace and running windows on your pc

change ftp_nick and ftp_pass in me.ftp to ur ftp account for ya webspace

example (ftp nick=    cooldude
                ftp pass=   fake        )

and in the ftp.lua file chane the ip in execute("FTP -s:me.ftp 127.0.0.1"); to your ftpaccount addy or ip

use +ftp in main chat to upload hubstats to website and type http://ur webspace adress/test.html

shads hubstat script (http://therapyuk.sytes.net/download/shadsHubStatScript.rar)

ok this is work in Progress

yours shad  

ps thanks for the idea WooshMan
Title:
Post by: jsjen on 27 September, 2004, 08:58:29
thats a cool script aswell. keep em coming I can help test them. I run a local server apache, php perl mysql. using phpnuke as the front.

is there a way to enter the stats you get into a mysql database? I would like to beable to do a share size on each users profile somehow, so I can have a greatest sharer list.

there is huge potential with this stuff, awsome.
Title:
Post by: hac on 20 December, 2004, 04:45:54
hi all download hubstats and put in my webserver! i have perl on it and have this errorr!!!
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


--------------------------------------------------------------------------------

Apache/2.0.52 (Win32) mod_perl/1.99_16 Perl/v5.8.4 PHP/5.0.3RC2-dev mod_ssl/2.0.52 OpenSSL/0.9.7c Server at 195.216.164.164 Port 80


http://195.216.164.164/cgi-bin/hub.cgi

how to fix it?
Title:
Post by: jsjen on 09 January, 2005, 01:13:10
Has this been improved?


Im about to see how it goes and want the latest version
Title: Webserver
Post by: Saivert on 27 April, 2005, 12:52:51
Go for a tiny webserver running as a plugin. Maybe one can implement a tiny-webserver in LUA as it already got a sockets API. I know someone wrote a web-server LUA script for PtokaX, maybe enhance that a little.

And when you got this tiny-webserver up and running you can write a PHP script that downloads an XML statistics file from the tiny-webserver. PHP got plenty of functions for doing HTTP downloads (either manually using PHP socket functions or the curl_* functions).

I'm starting to write a plugin for DCH++ that will serve some web pages (HTML template based) and offer advance data using a special URL "/data.cgi?action=stats&password=mypass".

Hope someone can do similar thing with PtokaX.
And for remote administrating the hub (like kicks, bans and so on) you can just create a DC client using PHP that runs some !commands on the hub.