S
Smackrazor
Guest
I haven't had the time to learn CGI, but I need to put a counter on my site. Will any CGI geniouses out there help me?
I know it is something like this (not quite sure):
#!/usr/local/bin/bash
cd [directory where this script resides among with the "counters" and "pic" directories]
CNT_NAME=`echo $DOCUMENT_NAME | cut -d'.' -f1 | cut -d'/' -f7-8`
CNT=`cat counters/$CNT_NAME`
echo $CNT+1 | bc >counters/$CNT_NAME
CNT=`cat counters/$CNT_NAME`
for i in `echo $CNT | sed -e 's/\([0-9]\)/\1 /g'`
do
echo -n "<IMG SRC=\"pic/$i.gif\" ALIGN=MIDDLE ALT=\"$i\">"
done
exit 0
http://www.pipboy2000le.f2s.com/cautious.jpg
Smackrazor
Webmaster of http://www.pipboy2000le.f2s.com/
Co-webmaster of http://diepokeman.virtualave.net/
I know it is something like this (not quite sure):
#!/usr/local/bin/bash
cd [directory where this script resides among with the "counters" and "pic" directories]
CNT_NAME=`echo $DOCUMENT_NAME | cut -d'.' -f1 | cut -d'/' -f7-8`
CNT=`cat counters/$CNT_NAME`
echo $CNT+1 | bc >counters/$CNT_NAME
CNT=`cat counters/$CNT_NAME`
for i in `echo $CNT | sed -e 's/\([0-9]\)/\1 /g'`
do
echo -n "<IMG SRC=\"pic/$i.gif\" ALIGN=MIDDLE ALT=\"$i\">"
done
exit 0
http://www.pipboy2000le.f2s.com/cautious.jpg
Smackrazor
Webmaster of http://www.pipboy2000le.f2s.com/
Co-webmaster of http://diepokeman.virtualave.net/