This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Channel Statistics

Help for those learning Tcl or writing their own scripts.
Post Reply
m
mm
Halfop
Posts: 78
Joined: Thu Jul 01, 2004 10:24 pm

Channel Statistics

Post by mm »

HI, I am running "PISG" for my chan stats using my shell account "public_html" folder but our channel web page is on different server, is there anyway i can link the stats from my shell to that webpage? and bot/script updates automatically? i'll appreciate for your help

thanks and happy new year
MM
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

Have you even tried to search for pisg in the tcl archive?
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Re: Channel Statistics

Post by demond »

mm wrote:HI, I am running "PISG" for my chan stats using my shell account "public_html" folder but our channel web page is on different server, is there anyway i can link the stats from my shell to that webpage? and bot/script updates automatically? i'll appreciate for your help

thanks and happy new year
I don't know pisg, but if it does support updating remote website, it would be through periodical ftp'ing of html files - something that you could manage yourself in case it's not supported by pisg - by setting up a cronjob using wget
m
mm
Halfop
Posts: 78
Joined: Thu Jul 01, 2004 10:24 pm

Post by mm »

Thanks a lot, you guys are always very helpfull. I was reading "Alchera" post regarding pisg, it's very helpfull, i am using his method of crontab, but how do i set ftp stuff in this crontab?

Code: Select all

#!/bin/sh 
statsbin="./pisg" 
statpath="/home/wombles/public_html/chanstats" 
cd $statpath 
$statsbin
Here's my crontab entry:
Code:

Code: Select all

0 0 * * * ~/public_html/chanstats/pisgchek >/dev/null 2>&1 

Thanks again
MM
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

I was wrong, you need to use curl, not wget (I don't believe wget has upload capabilities)

for example, this shell command will set up a cronjob to upload all html files from your public_html directory to the remote webserver every other hour:

Code: Select all

echo "00 0-23/2 * * * cd /home/yourlogin/public_html; for i in *.html; do /usr/bin/curl -T $i ftp://your.webserver.com/public_html/ -u yourlogin:yourpassword >/dev/null 2>&1; done" | crontab -
m
mm
Halfop
Posts: 78
Joined: Thu Jul 01, 2004 10:24 pm

Post by mm »

thanks again demond, i am using shell account, so how to check if they have usr/bin/curl, so when i add your codes to "crontab" it should work, or should i ask shell admin to install curl?

thanks again
MM
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

in the shell type: which curl

if nothing comes up, ask the admin to install it

or, you can build & install it yourself for your private use (in ~/bin)
m
mm
Halfop
Posts: 78
Joined: Thu Jul 01, 2004 10:24 pm

Post by mm »

thanks a lot.
MM
User avatar
devilsoulblack
Halfop
Posts: 62
Joined: Wed Nov 19, 2003 9:18 pm
Location: Chile
Contact:

Re: Channel Statistics

Post by devilsoulblack »

mm wrote:HI, I am running "PISG" for my chan stats using my shell account "public_html" folder but our channel web page is on different server, is there anyway i can link the stats from my shell to that webpage? and bot/script updates automatically? i'll appreciate for your help

thanks and happy new year

used this

lftp -u user,paswd ftp.webpage.com -e "cd www ; cd stats ; put /home/user/pisg/index.html ; quit"

and for auto upload put this in cron

10 0,6,12,18 * * * lftp -u user,paswd ftp.webpage.com -e "cd www ; cd stats ; put /home/user/pisg/index.html ; quit"
---------
Add [SOLVED] to the thread title if your issue has been.
Search - FAQ
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Post Reply