phptelemeter is a script that can read the webpages for the webbased 'quota' monitor made available by ISP's. These pages can contain both the actual status, and the status since the last 'reset', which happens on a date set by the ISP. This is what makes up the used quota.
First off, to actually run this script you must tell it where the php binary is. Edit phptelemeter.php and modify the first line to #!/path/to/php -q. On Debian Sid, this is /usr/bin/php.
To create the initial configuration file, just run the script.
Command line options
There are several options:
-c, --check-version Checks if your phptelemeter is the latest
-D, --debug Shows lots of debugging info
-h, --help Shows this help message
-i, --ignore-errors Ignores any errors that might occur and continue
-n, --new-config Makes a new dummy config file in the current dir
-N, --no-config Don't create a config file if none exists
-t, --add-option <section> <key> <value> Adds the key=value to the [section] of the configuration
-V, --version Shows the version and exits
-e, --encrypt <password> Encrypts the supplied password
-x, --decrypt <password> Decrypts the supplied password
-C, --cache-file <name> Where to look for the cache file
-a, --enable-cache Enables the cache file
-o, --disable-cache Disables the cache file
-d, --daily Shows statistics for current period
-f, --file-output Activates file output instead of screen output
-g, --graph Shows the usage graphs
-p, --publisher <name> Uses the supplied publisher
-r, --remaining Shows your max traffic allotment for today
-z, --resetdate Shows the quota reset date
It requires PHP >= 5.0.0, and the PHP CURL extension, compiled with SSL support!
Alternatively, you can also download it from this site locally.
Notes on encryption
The encryption used in phptelemeter is very easily reversible. Do not depend on it as your sole way for keeping your information safe!
Added the NEWS file to the files to check if there's a configuration issue
Added a default for argv=empty array if not set, to avoid another warning (Thanks to jorgo from userbase.be)
Updated telemeter_web (updated website)
Fixed telemeter4tools for FUP meters
Fixed telemeter_web for FUP meters
Added support to set timezone from the application as opposed to systemwide via php.ini
Removed call-time pass-by-reference function calls (deprecated in php 5.3)
Corrected 'php version too low' error to actually ask for php >= 5.0.0
Added subaccount parameter to account section, to select the actual account in case there are multiple under the same login
Updated mobilevikings_api parser to new API (2.0)
The edpnet_web parser is dropped for now - I haven't been able to figure out sofar how to make it work again against their new AJAX-drive site
Fixed telemeter4tools parser, telenet's WSDL is faulty...
Added reset_date to mobilevikings_api parser
Bumped required php version to 5.0.0
Replaced nusoap library with SoapClient class that comes with php5 (feature request: 2948630)
Dropped the xmlparser library, it's no longer needed for telemeter4tools
Updated gpl2 license link
Fixed telemeter_web parser after Telenet updates.
Fixed telemeter4tools parser after API updates.
Added support for Mobile Vikings
Added note for Mac OS X 10.6 (Snow Leopard) / PHP 5.1
Added unlimited support for Dommel accounts (bug report: 2886030)
Fixed telemeter4tools parser.
Added a check for the new scarlet unlimited accounts
Spellingfix: changed 'seperate' to 'separate'
Added support for single-quota separate-info providers, needed since the daily output for the scarlet_web parser was broken. Removed "text-transform: lowercase;" from the html publisher (bug report: 2197767)
Fixed a bug in the scarlet_web code
Added mysql publisher (feature request: 1671210)
Limited warn-percentage to 2 digits after the comma (feature request: 1936213)
Added reset date to over-limit notification mails (feature request: 1837559)
Added red-hilighting support to plaintext_graphonly publisher
Moved the publisher parameter to a new [publisher] section, allowing for publisher-specific config settings
The machine publisher now has a configuration parameter, separator
Added (feature incomplete) edpnet_web parser, thanks to Ze0n- for testing!
Added --add-option option to add configuration options without changing the config file
Added --no-config option to make phptelemeter not generate a config file if none is present (can be used together with --add-option)
Splitted all config-related README items into a new document, Configuration
Added an imgbar publisher (thanks to Nikon for the idea and concept code)
Fixed telemeter_web parser
Added more error codes to the telemeter4tools parser
Fixed scarlet parser
Added parser simulators for single and separate quotas
Added option to change publisher at runtime without having to modify the configuration
Changed license to GPLv2 only
Implemented state-tracking for emails (feature request: 1718771)
Implemented red-hilighting of the used-up quota in the html and plaintext publishers (feature request: 1718774)
publisher_html is now XHTML compliant, with a nice CSS theme, thanks to _rEuTeL_
Changed returncode to 0 instead of -1 (255)
Fixed stupid mistake when creating a new config file with -n
Fixed problem in telemeter4tools parser, it didn't output the right value for the used info
Fixed some more warnings in E_ALL mode
Fixed scarlet_web date change bug (fixes: 1707175)
Fixed scarlet_web days left counting (and possibly others, general fix)
Changed publishers to show that you've used up all your quota instead of showing 0 MiB overuse (fixes: 1706094)
Implemented login detail obfuscation in debug logs (feature request: 1681619)
Implemented warn-email sending. (feature request: 1693396)
Added no_output publisher which gives no output (for use with warn-mail)
Implemented including files in the config file. (feature request: 1671787)
Implemented password encryption/obfuscation. (feature request: 1674607)
Replaced gregoriantojd() calls with something else, fixes phptelemeter if php is compiled without --enable-calendar. (feature request: 1684526)
Changed Telenet parsers: Telenet now has one fix quota instead of seperate upload/download (bug 1671798)
Updated publishers to work with a history of one quota and seperate quotas (also for Telenet)
Added count of days left until your quota resets.
REALLY fix the scarlet_web parser. Thanks Gh0sty!
Updated the xmlparser.php external library, the fixes were incorporated upstream.
Migrated codebase to svn (from cvs)
Increased # of accounts to 99 (request from YvesDM)
Fixed dommel_web parser to work with new counter
Reformatted documentation to fit on 80-char wide terminals
New parameter: ignore_errors, makes phptelemeter ignore any runtime errors (instead of quitting).
Splitted off all common publisher stuff into a new parent class.
Fixed warnings/notices that appear when php is run with E_ALL error reporting.
Removed useless variable from parser_telemeter4tools
Fixed error handling in scarlet_web parser
Fixed off-by-one bug in the last day before reset in the scarlet_web parser.
Fixed dommel_web and telemeter_web parsers.
Added new publisher, plaintext_graphonly, which only shows a graph. (Requested by Gh0sty)
Fixed telemeter_web parser (again).
Fixed dommel_web parser for overusage.
Fixed parsing of skynet_web when used quota is less than one gigabyte
Added detection of overusage on Dommel parser
Added detection of 'Access Denied' errors on Skynet parser
Added parser upccz_web for UPC in the Czech Republic (written by Miroslav Suchý)
Made phptelemeter PHP5 compatible.
Added detection of positions in the webpage for the telemeter_web parser (less prone to error on page changes)
Added scarlet_web parser for Scarlet
Made skynet_web parser more robust
Cleaned up telemeter_web parser
Extracted the common functionality between the _web parsers and moved it to a parent class
Removed some useless debugging code
Fixed bug in calculation code
Added skynet_web parser for Skynet
Added Dommel parser, making phptelemeter now officially multi-ISP compatible!
Fixed telemeter_web parser for Telenet Changes
Added configuration parameter for file output extension
Fixed telemeter_web parser
New feature: phptelemeter can now check if there's a new version available.
New feature: proxy support, with new keys.
Slight spelling corrections
Implemented (untested) start of other platform compatibility
Corrected telemeter_web parser for changes in the Telemeter web page
Fixed wrongly used obsolete daily parameter when using --daily
Patched NuSOAP library to allow http proxy connections (didn't work earlier)
Bugfix: old error identifiers were still in place, changed.
Bugfix: parameter should be show_resetdate, not show_reset_date
Renamed the daily confiuration file option to show_daily
Added new configuration file option show_reset_date
Documentation updates Finally was able to fix the telemeter4tools parser, since the URL is back online.
Fixed some small discrepancy in the telemeter_web parsing rules.
Added short-form command line options, and made command-line options case sensitive.
Added option show_graph (and command line --graph) to show (or not) the transfer graphs
Moved some common code to functions
Moved the calculation of the values to the main program instead of the parsers
Fixed problems with the telemeter_web parser and 'big' accounts.
Fixed problems with the telemeter_web parser when there was mentioning 'free' traffic on the telemeter site
Fixed a bug in the multi-account handling of the telemeter_web parser
Changed telemeter4tools parser to use the new SOAP url
Changed the publishers to reflect the new telemeter
Updated the NuSoap library
Updated the telemeter_web parser to be usable on the new pages.
Added more debugging code
Bugfix release: wrong variable was passed in the getNeededModules() code.
PHP's error reporting level will be set to E_ERROR | E_WARNING at start of the script.
Implemented output publishers and moved existing output framework to that framework
Implemented html output publisher
Added workaround for telemeter4tools parser
Fixed telemeter_web module to support new telemeter web page.
Fixed statistic reporting miscalculation in telemeter_web module
Added possibility to put phptelemeter 'systemwide' and still find the modules ;p
Added Telemeter4Tools compliance
phptelemeter is now extensible with custom made datafeeders!
Fixed parsing of the telenet telemeter pages
Added functionality to dump output in files instead of stdout.
Updated human output to take volume exceeding into account.
Added check for needed php modules
Added support to query multiple accounts
Several small bugfixes.
Better output layout too.
The content of these pages is © 2003 - 2016 kcore.org