Webstats
Moderator: Moderators
Webstats
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 ?
'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 ?
Webstats
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.Your site worked fine for me...no errors at all.
Last Updated: 10/10/2003 10:33:04 PM
But thx anyway
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
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
Webstats
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
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
and the configuration of ftpbatch.txt, in C:\ProgramN\Direct Connect Hub\FtpBatch.txt
[/code][/quote]
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)
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
Hi hi hoo
Thx
Thanks InnerCity. it helped Me with Your config of the file. Everythings working perfect. Thx a lot
Updated version of this script can be found here :
http://www.snooze.no-ip.com/snooze3/viewtopic.php?t=37
Enjoy![Smile :)](./images/smilies/icon_smile.gif)
http://www.snooze.no-ip.com/snooze3/viewtopic.php?t=37
Enjoy
![Smile :)](./images/smilies/icon_smile.gif)
The webstat does include a max share peak !what about to implement a typical record-bot in webstats to show the maximun ever shared peak or maximun users ever connect?
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
there is a bug in countrystats.script
if you type cshelp and before that you typed countrystats, then its shown this
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.
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
Code: Select all
sResults = sResults & vbCrLf & Countries(i) & vbTab & String(oTemp(Countries(i)),"¦") & " " & oTemp2(Countries(i)) & " " & CStr(oTemp(Countries(i)))
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
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
SaveStats Function
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
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
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.
Will do the same with the SaveStats function aka..
Function SaveStats(tTemplate,tOutputFile)
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
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