Webstats

Which hub software is the best? Where can I find script XXX? Discuss it here...(no, this is not for advertising your hub...)

Moderator: Moderators

Locked
Casb++
Posts: 14
Joined: 2003-01-06 17:43
Contact:

Webstats

Post by Casb++ » 2003-10-10 16:31

Hi. I'm trying to get my webstats on the net But it won't work. it work perfectly on my local computer.

'webstats.script (this file) -> C:\Program files\Direct Connect Hub\scripts
'template.htm (template www page) -> C:\Program files\Direct Connect Hub
'index.htm (local www page) -> If you use ftp, C:\Program files\Direct Connect Hub is enough, otherwise your shared web folder
'image files -> To 'images' subfolder to your web server
'
'Thanks for FLiXD of his rainbow obsession, and other motivators at http://dc.ww-ei.com

Dim clsStats,iUpdateInterval,iChatLines,iTicker,sTemplateFile,sOutputFile,sSettingsFile,sStatsStart
Dim iUserH(23),iUserW(6),iChatH(23),iChatW(23),iPacket(11),iPeakUsers,sPeakTime,iPeakShare,iStatHour,iStatWeekday
Dim sTemplate,sStartup,sShutdown,sStatus,sChat,iResets,iBoots,iCrashes,iUptime,iPackets,sReset,iLogins,iKicks,iRedirects
Dim bUseFtp,sFtpBatchFile,sFtpLogFile,sFtpAddress,sFtpUsername,sFtpPassword

Sub Main

iUpdateInterval = 1 '<- In minutes
iChatLines = 25 '<- How many chat lines will be shown
sTemplateFile = "d:\internet\Direct Connect Hub\template.htm" '<- Path to www template file (file must be found)
sOutputFile = "d:\internet\Direct Connect Hub\index.htm" '<- Path to www output file (script creates this file)
sSettingsFile = "StatSettings.txt" '<- Path to settings file (script creates this file)
bUseFtp = True '<- True if you want to use FTP upload, False if not
sFtpBatchFile = "FtpBatch.txt" '<- Local batch file for ftp.exe (script creates this file)
sFtpLogFile = "FtpLog.txt" '<- Local file for FTP log, read this file if something goes wrong
sFtpAddress = "http://hjem.get2net.dk/schaeferdor/index.htm" '<- Where to send the page (path must exist)
sFtpUsername = "XXXXXXX" '<- Your FTP username
sFtpPassword = "XXXXXXXX" '<- Your FTP password

Index.htm, Template.htm, ftpbatch.txt and ftplog.txt is located on both my homepage and in the dchub dir.

My homepage is
http://hjem.get2net.dk/schaeferdor
My username and password is correct. What's wrong ?

Gratch06
Posts: 141
Joined: 2003-05-25 01:48
Location: USA

Post by Gratch06 » 2003-10-10 17:00

Your site worked fine for me...no errors at all.
Last Updated: 10/10/2003 10:33:04 PM

Casb++
Posts: 14
Joined: 2003-01-06 17:43
Contact:

Webstats

Post by Casb++ » 2003-10-10 17:20

Your site worked fine for me...no errors at all.
Last Updated: 10/10/2003 10:33:04 PM
No it don't. The graphics works but it has not been updated since 10/10/2003- 10:33PM and it schould update every 1 minute.
But thx anyway

InnerCity
Posts: 105
Joined: 2003-05-17 00:35

Post by InnerCity » 2003-10-10 19:02

it works perfect for me
i update statistics automatically every hour by ftp
http://www.iespana.es/itspanish/estadisticas/index.htm

try to use a smaller average of updating time, ftp needs time to connect, time to upload and time to disconnect,
use an application to know if ftp.exe is connecting and transfering, as x-netstat
Hi hi hoo

InnerCity
Posts: 105
Joined: 2003-05-17 00:35

Post by InnerCity » 2003-10-10 19:04

and use this syntax

sFtpAddress = "ftp.iespana.es/estadisticas/index.htm" '<- Where to send the page (path must exist)
sFtpUsername = "xxxxx" '<- Your FTP username
sFtpPassword = "xxxxx" '<- Your FTP password
Hi hi hoo

Casb++
Posts: 14
Joined: 2003-01-06 17:43
Contact:

Webstats

Post by Casb++ » 2003-10-12 12:37

sFtpAddress = "ftp.iespana.es/estadisticas/index.htm" '<- Where to send the page (path must exist)
sFtpUsername = "xxxxx" '<- Your FTP username
sFtpPassword = "xxxxx" '<- Your FTP password


Dosen't not work for me, and I don't know why

I can upload via an ftp program but not by Webstat

InnerCity
Posts: 105
Joined: 2003-05-17 00:35

Post by InnerCity » 2003-10-12 13:26

webstat use the ftp of windows to upload the file, but you must tell it the way
not this "http://hjem.get2net.dk/schaeferdor/index.htm"
must be "ftp.host_company/folder"
look at this, my index address of statistics is
http://www.iespana.es/itspanish/estadisticas/index.htm
http://host_company/user/folder/file
but my ftp addess to upload is
ftp.iespana.es/estadisticas/index.html
ftp.host_company/folder/file

dont know who is you hosting company, maybe this???
ftp.get2net.dk/folder/file
user=hjem


take a look at my configuration

Code: Select all

'webstats.script (this file) -> C:\ProgramN\Direct Connect Hub\scripts
'template.htm (template www page) -> C:\ProgramN\Direct Connect Hub
'index.htm (local www page) -> If you use ftp, C:\ProgramN\Direct Connect Hub is enough, otherwise your shared web folder
--------------------------
  sTemplateFile   = "template.htm"     '<- Path to www template file (file must be found)
  sOutputFile     = "C:\ProgramN\Direct Connect Hub\index.htm" '<- Path to www output file (script creates this file)
and the configuration of ftpbatch.txt, in C:\ProgramN\Direct Connect Hub\FtpBatch.txt

Code: Select all

open ftp.iespana.es
itspanish_es <--user
****** <--pass
cd estadisticas
ascii
put "C:\ProgramN\Direct Connect Hub\index.htm" "index.htm"
quit
[/code][/quote]
Hi hi hoo

Casb++
Posts: 14
Joined: 2003-01-06 17:43
Contact:

Thx

Post by Casb++ » 2003-10-13 05:02

Thanks InnerCity. it helped Me with Your config of the file. Everythings working perfect. Thx a lot

Snooze
Posts: 119
Joined: 2003-01-26 13:42
Location: Denmark
Contact:

Post by Snooze » 2003-11-04 07:32

Updated version of this script can be found here :

http://www.snooze.no-ip.com/snooze3/viewtopic.php?t=37


Enjoy :)

InnerCity
Posts: 105
Joined: 2003-05-17 00:35

Post by InnerCity » 2003-11-04 10:10

nice
:D
Hi hi hoo

InnerCity
Posts: 105
Joined: 2003-05-17 00:35

Post by InnerCity » 2003-11-12 09:01

what about to implement a typical record-bot in webstats to show the maximun ever shared peak or maximun users ever connect?
Hi hi hoo

Snooze
Posts: 119
Joined: 2003-01-26 13:42
Location: Denmark
Contact:

Post by Snooze » 2003-11-12 09:16

what about to implement a typical record-bot in webstats to show the maximun ever shared peak or maximun users ever connect?
The webstat does include a max share peak !

Code: Select all

Hub address yourhub.no-ip.com
Description Your hub name 
Status Online, started 11/10/2003 9:15:52 PM 
Statistics updated 11/12/2003 3:11:07 PM 
Users online (max) 31 (125), peak 125 at 11/11/2003 9:02:04 PM 
Shared data 3.3209 TB (109.6968 GB per user), peak 3.4436 TB 
(you will find this in both the normal version and the updated)

InnerCity
Posts: 105
Joined: 2003-05-17 00:35

Post by InnerCity » 2003-11-12 13:59

its not a real peak, everytime you restart the computer these values are reset
Hi hi hoo

Snooze
Posts: 119
Joined: 2003-01-26 13:42
Location: Denmark
Contact:

Post by Snooze » 2003-11-12 14:13

Thats true ...every time the script is reset it will reset those peaks ...

Im sure that one of the smart minds in here can figure out a way for it to only overwrite the number saved in the txt file if the count is higher than whats allready stated..

InnerCity
Posts: 105
Joined: 2003-05-17 00:35

Post by InnerCity » 2003-11-13 16:08

there is a bug in countrystats.script

Code: Select all

 Case "cshelp"
         If Not isOp Then Exit Sub  ' Comment out line if you want everyone to use this command.
         Respond sResults
	 sResults = "CountryStats - Show stats of countries represented in the hub." & vbCrLf
         sResults = sResults & "UsersByCountry (CountryCode) - Show users from a Country. Use Country Code: US" & vbCrLf
         sResults = sResults & "IpCountry ###.###.###.### - Show Country Origin of IP address." & vbCrLf
if you type cshelp and before that you typed countrystats, then its shown this

Code: Select all

sResults = sResults & vbCrLf  & Countries(i) & vbTab & String(oTemp(Countries(i)),"¦") & " " & oTemp2(Countries(i)) & " " & CStr(oTemp(Countries(i)))
so better this way

Code: Select all

      Case "cshelp"
         If Not isOp Then Exit Sub  ' Comment out line if you want everyone to use this command.

	 sResults = "CountryStats - Show stats of countries represented in the hub." & vbCrLf
         sResults = sResults & "UsersByCountry (CountryCode) - Show users from a Country. Use Country Code: US" & vbCrLf
         sResults = sResults & "IpCountry ###.###.###.### - Show Country Origin of IP address."
         Respond sResults
Hi hi hoo

Snooze
Posts: 119
Joined: 2003-01-26 13:42
Location: Denmark
Contact:

Post by Snooze » 2003-11-17 07:02

Thanks :)

I'll correct it when i get home for work :D

DamionNH
Posts: 25
Joined: 2003-01-07 11:05

Post by DamionNH » 2003-11-18 15:01

The following Code will save the Max values. You will need to put the current values in the StatSettings.txt file in the order they appear at the bottom. Peak Users, Peak Time, and Peak Share.

This should work, if not, should be able to wipe out the StatSettings.txt file and start again.

Untested, so usual disclaimers.....

LoadStats Function

Code: Select all

    sDateRegged=ReadFile.ReadLine ' -dnh
    iPeakUsers=ReadFile.ReadLine   ' New Line
    sPeakTime=ReadFile.ReadLine   ' New Line
    iPeakShare=ReadFile.ReadLine  ' New Line
    ReadFile.Close
SaveStats Function

Code: Select all

  WriteFile.WriteLine(sDateRegged)
  WriteFile.WriteLine(iPeakUsers)  ' New Line
  WriteFile.WriteLine(sPeakTime)  ' New Line
  WriteFile.WriteLine(iPeakShare) ' New Line
  WriteFile.Close
Owner of Lurkers Lair a Phoenix Rising Hub

DamionNH
Posts: 25
Joined: 2003-01-07 11:05

Post by DamionNH » 2003-11-20 13:23

Guess I didn't make this clear enough.

Find the LoadStats Function aka as it appears in the script

Sub LoadStats

Goto the end of this subroutine, you will seen the 1st and 5th line of the following code. Add the three lines with the ' New Line comment between the two existing ones.

Code: Select all

    sDateRegged=ReadFile.ReadLine ' -dnh 
    iPeakUsers=ReadFile.ReadLine   ' New Line 
    sPeakTime=ReadFile.ReadLine   ' New Line 
    iPeakShare=ReadFile.ReadLine  ' New Line 
    ReadFile.Close 
Will do the same with the SaveStats function aka..

Function SaveStats(tTemplate,tOutputFile)

Code: Select all

 WriteFile.WriteLine(sDateRegged) 
  WriteFile.WriteLine(iPeakUsers)  ' New Line 
  WriteFile.WriteLine(sPeakTime)  ' New Line 
  WriteFile.WriteLine(iPeakShare) ' New Line 
  WriteFile.Close 
Owner of Lurkers Lair a Phoenix Rising Hub

Snooze
Posts: 119
Joined: 2003-01-26 13:42
Location: Denmark
Contact:

Post by Snooze » 2003-11-21 03:40

This has now been tested and its working :)

Thanks Damion !

Demo HERE

InnerCity
Posts: 105
Joined: 2003-05-17 00:35

Post by InnerCity » 2003-11-21 04:12

sDateRegged

cant find this variate in the version that i downloaded from snooze forum
is there an updated version of hubstats?
Hi hi hoo

Snooze
Posts: 119
Joined: 2003-01-26 13:42
Location: Denmark
Contact:

Post by Snooze » 2003-11-21 04:55

Oops :oops:

I've uploaded an old version by mistake last time i updated it :(

I'll upload the correct script tonight... Sorry :(

DamionNH
Posts: 25
Joined: 2003-01-07 11:05

Post by DamionNH » 2003-11-21 10:02

he's at it again.. :lol:
Owner of Lurkers Lair a Phoenix Rising Hub

Snooze
Posts: 119
Joined: 2003-01-26 13:42
Location: Denmark
Contact:

Post by Snooze » 2003-11-21 11:53

Script is now updated ...



(hahah damion)

InnerCity
Posts: 105
Joined: 2003-05-17 00:35

Post by InnerCity » 2003-11-21 21:53

uhmm, is still not updated, i have downloaded the same version or...this new version still have not sDateRegged anywhere...

waiter, a pint of coffee for snooze, he works too much and sleep while driving his car :shock: :shock: :shock: :shock: :shock:
Hi hi hoo

Locked