ForumTEK.Net - IRC Forumu

ForumTEK.Net - IRC Forumu (http://www.forumtek.net/index.php)
-   PHP Hazır Kodlar (http://www.forumtek.net/forumdisplay.php?f=302)
-   -   Cpanelden bandwidth kontrol etmek (http://www.forumtek.net/showthread.php?t=3969)

Mattet 26 Ağustos 2016 13:24

Cpanelden bandwidth kontrol etmek
 
PHP ile cpanelden bandwidth kontrol etmek.aşağıdaki sadece bir örnektir.siz burda bi dizi ile tüm sitelerinizin bw lerini kontrol edebilirsiniz.

PHP- Kodu:

<?php  
/*############################  
php ile cpanelden bandwidth kontrol  
xxxxxx <xxxxxx>  
yardım : xxxxxx 
mysql/cpanel-bandwidth-kontrol.html  
############################*/  

$kullaniciadi = "kullaniciadi"; // cpanel kullanıdı adı  
$sifre = "sifre"; // cpanel sifreniz  
$domain = "domain"; // cpanel domain adı  
$theme = "x"; // cpanel theme  


ini_set("display_errors", "0");  
$file =  file_get_contents("http://$kullaniciadi:$sifre@$domain:2082/frontend/$theme/index.html")  or die("<b>critical error, ayarları kontrol ediniz</b>");  
$string1 = strpos($file, "bandwidth (this month)");  
$file = substr($file,$string1);  
$string2 = strpos($file, "megabytes");  
$length = strlen($file);  
$take =  $length - $string2;  
$finally = substr($file,0,-$take);  
$number = explode("<td class=\"index2\">", $finally);  
$number = explode(" ",$number[1]);  
$bandwidth = $number[0];  

echo 
$bandwidth; 

?>



All times are GMT +3. The time now is 23:57.

Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.