[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
FREESCO Support • View topic - Uptime Client
Page 2 of 2

PostPosted: Thu Mar 06, 2003 11:42 pm
by Peer

PostPosted: Fri Mar 07, 2003 9:26 am
by Peer
Skipster,
Please help me,
I lost track of it all, i am trying to get the uptim to work, it only work's partial <a href='http://peer.no-ip.org/' target='_blank'>http://peer.no-ip.org/</a>
I have been searching the forum for suggestion's and script's but i got lost in the mixed up jungle of broken links and other mismatches.
Jou say in your post Dec 14 2002, 06:09 PM to try TJ's script, but the link is also broken.
I have been trying to get technojunky's script to work but i get the strangest output :

expr: non-numeric argument
math: stack underflow
math: stack underflow

Here is the script i am using :

<span style='font-size:8pt;line-height:100%'>[Linux] cat /bin/get_all.sh
#!/bin/sh
#
# Go to Yahoo's weater website at weather.yahoo.com, navigate to the weater
# page nearest to you, note the location code.
#
# For example, myself, i live in Montreal, so if i navigate to the page of my
# city, it will be at this page:
#
# Eindhoven: <a href='http://weather.yahoo.com/forecast/NLXX0007_c.html' target='_blank'>http://weather.yahoo.com/forecast/NLXX0007_c.html</a>
#
# So the location code would be "NLXX0007". Assigned your location code to
# the variable here. Don't put the ending "_f" (or "_c").
LOCATION="NLXX0007"
FOLDER=/www/uptime

# "C" for Celcius, "F" for Farenheits.
UNITS="C"

case $UNITS in
"C"|"c")
QUERY="http://weather.yahoo.com/forecast/"$LOCATION"_c.html?force_units=1";;
"F"|"f")
QUERY="http://weather.yahoo.com/forecast/"$LOCATION"_f.html";;
*)
echo -n "" >$FOLDER/temp.dat;exit
esac
snarf -nq "$QUERY" $FOLDER/temp.html
[ ! -f $FOLDER/temp.html ] && (echo -n "" >$FOLDER/temp.dat;exit)
echo -n `sed -n -e '/^[-0-9][0-9]*<!--/s/<!--//p' $FOLDER/temp.html`$UNITS >$FOLDER/temp.dat
#rm $FOLDER/temp.html

# Up rate calculation...

ON=`cat /proc/uptime | sed -e 's/\ .*//'`
for num in `sed -e '/SHUT/!d;s/^.*\t//' /usr/local/uptime/log/uptime.log`; do
ON=$(expr $ON + $num)
done
for num in `sed -e '/POWR/!d;s/^.*\t//' /usr/local/uptime/log/uptime.log`; do
ON=$(expr $ON + $num)
done
NOW=`/bin/date +%s`
START=$(/bin/date -d "`sed -n -e 's/Log\ started\ on\ //p' /usr/local/uptime/log/uptime.log`" +%s)
ALL=$(expr $NOW - $START)
PCT=$( math $ON $ALL div )
echo -n $( math $PCT 100 mul ) > /www/uptime/uprate.dat</span>

Anny suggestion is welcome

PostPosted: Fri Mar 07, 2003 12:14 pm
by Skipster
lets move this to support: <a href='http://forums.freesco.org/support/index.php?act=ST&f=21&t=6565' target='_blank'>http://forums.freesco.org/support/index.ph...=ST&f=21&t=6565</a>