usage stats script for non-telkom isp

Obelix

Senior Member
Joined
Sep 28, 2003
Messages
961
Reaction score
4
Location
Port Elizabeth, South Africa
i have an isdsl account and i'd like to do a usage stats script similar to the telkom one

Im doing this in perl, but im having trouble with the regex stuff.

I managed to get the response from the server. Its hell to try and figure out.
Code:
Date: Tue, 08 Feb 2005 20:24:10 GMT
Content-Type: text/html; charset=ISO-8859-1
Expires: Tue, 08 Feb 2005 20:24:10 GMT
Server: Apache/1.3.29 (Unix) PHP/4.3.1 mod_ssl/2.8.16 OpenSSL/0.9.7c mod_perl/1.29
Via: 1.1 ctb-cache2 (NetCache NetApp/5.5R6D11)
Sleeping for 300 seconds.
<!DOCTYPE PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US"><head><title>ADSL User Statistics</title>
<link rel="stylesheet" type="text/css" href="/style/main.css" />
</head><body><div id="container"><div id="banner"><h1>ADSL User Statistics</h1></div><div id="menu"><ul><li><a href="/perl/index.pl">Home</a></li><li><a href="/perl/history.pl">Logon History</a></li><li><a href="/perl/faq.pl">Frequently Asked Questions</a></li><li><a href="http://www.saix.net">SAIX Homepage</a></li></ul></div><div id="content"><h3>Online Stats for : [email protected]</h3><center><h3>Cumulative Totals for February 2005</h3></center><table cellspacing="1"><th>Online Time (Seconds)</th><th>Upload (Bytes)</th><th>Download (Bytes)</th><th>Combined (Bytes)</th><tr><td>675493</td><td>156 737 346</td><td>1 121 285 958</td><td>1 278 023 304</td></tr></table><h3>Daily Totals for February 2005</h3><table cellspacing="1"><th>Date</th><th>Online Time (Seconds)</th><th>Upload (Bytes)</th><th>Download (Bytes)</th><th>Combined (Bytes)</th><tr><td>08-FEB-05</td><td>71072</td><td>7 060 126</td><td>57 499 540</td><td>64 559 666</td></tr><tr><td>07-FEB-05</td><td>86295</td><td>12 378 855</td><td>41 752 487</td><td>54 131 342</td></tr><tr><td>06-FEB-05</td><td>86342</td><td>45 201 174</td><td>86 551 743</td><td>131 752 917</td></tr><tr><td>05-FEB-05</td><td>86358</td><td>24 394 541</td><td>57 439 030</td><td>81 833 571</td></tr><tr><td>04-FEB-05</td><td>86357</td><td>8 434 334</td><td>146 875 815</td><td>155 310 149</td></tr><tr><td>03-FEB-05</td><td>86356</td><td>5 781 398</td><td>73 251 222</td><td>79 032 620</td></tr><tr><td>02-FEB-05</td><td>86357</td><td>5 080 298</td><td>45 719 681</td><td>50 799 979</td></tr><tr><td>01-FEB-05</td><td>86356</td><td>48 406 620</td><td>612 196 440</td><td>660 603 060</td></tr></table><a href=/perl/index.pl?YEAR=2005;MONTH=1>&lt&lt back</a> 1 month <p>Please note that the above data does <em>not</em> include any active sessions.  Data is only updated after your session ends</p></div><div id="footer">Copyright &copy;2005 Telkom SA Ltd. All rights reserved (User Logged as: [email protected]).</div></body></html></div>   PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
im looking for the 1 278 023 304 bit ( the bit just before the Daily totals ).

Anyone with regex experience wanna give me a hand with this ?

Obelix
 
Top
Sign up to the MyBroadband newsletter
X