If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
It isn't a replacement for cpanel, since it grabs the data directly from cpanel. It's a way to display the amount used to your users, who (hopefully :D) cannot view your cpanel.
In a normal situation, it will not be viewed. Here are the ways that your info could be revealed:
1) PHP breaks. Apache simply sends out the php script, without processing it
2) Someone gets FTP access and downloads it that way
I personally wouldn't use this script because of the tiny chance of hacking. Instead, I'd modify the script so that it updates a txt file with the bandwidth amount. I would then put that script in a non-web-accessable directory, and set up a cron job to run it every 5 minutes.
Before you criticize my 5 minute work, there is another way of doing it this way.
PHP Code:
<?php class cpanel { /** * @var resource contains curl resource for communication with cpanel **/ var $socket ; /** * @param string username your cpanel username * @param string password your cpanel password * @param string hostname your cpanel hostname * @param bool ssl indicate ssl availability * @param string theme indicate the theme being used * @return void * * This will give you the default settings of using ssl and X as the theme * <code><?php $cpanel = new cpanel( 'username', 'password', 'hostname' ); ?></code> * * This will allow you to disable SSL * <code><?php $cpanel = new cpanel( 'username', 'password', 'hostname', false ); ?></code> * * This will allow you to disable SSL and change the theme * <code><?php $cpanel = new cpanel( 'username', 'password', 'hostname', false, 'mytheme' ); ?></code> **/ function cpanel( $username, $password, $hostname, $ssl = true, $theme = 'x' ) { $this->ssl = $ssl ; $this->username = $username ; $this->password = $password ; $this->hostname = $hostname ; $this->request = $request ; $this->theme = $theme ;
Location: Toronto, Canada/Muntinlupa City, Philippines
Posts: 496
Credits: 243
Re: cPanel Remote Bandwidth Script
^I like this version better....
__________________
It's me, dgenx210
If you find my posts helpful, please add it to my reputation () or spare me some x10˘'s.
I would really appreciate it if you do any of the two.
---------------
Tutorials!: Webmail Login Script v.1.00(By Passing the Popup Prompt)
---------------
---------------
Oh My God!!! Just what I wanted just in time! I must be able to feel these thing happen. Everytime I want something it pops up right in front of me the same day. What a pity it doesen't do the same thing with money...
Hey brandon, is it possible to do the script show total bandwidth used over time. So if my site have used 50 gb under 1 year it will show that? So it show total bandwidth used from the implementent of the script?