I made this script to count the characters and accounts.
It has to be on the same host, with the server, otherwise it will not work.
If you'd like to use this script on an external host, you need to use <iframe> (more - below)
- First of all, you need to be sure, that you have webserver (like Xampp, Wampp, Appserv ), with php support on your localhost. With epic webserver, this isn't working!
- Than you need to create a file named counter.php and copy the code below.
PHP Code:
<?php
/*
Character and Account counter script
Made by Pityu from Bestudion, owner
of DimensionCO Private Server
Any question: http://www.elitepvpers.com/forum/members/1926551-pitylee.html
*/
//get path of User Directory
$dir1 = "C:\OldCODB\Users";
//open a handle to User Directory
$handle1 = opendir($dir1);
//intitialize The Counter
$count1 = -3; // This is -3, cuz there is the .(Thumbs, htacces), .., and the Characters folder which we dont count in...
//loop through the directory
while (false !== ($file1 = readdir($handle1)))
{
$count1++;
}
echo "We have ";
echo $count1;
echo " registered accounts,<br> and ";
//get path of Characters Directory
$dir = "C:\OldCODB\Users\Characters";
//open a handle to the Characters Directory
$handle = opendir($dir);
//intitialize The Counter
$count = -2; // This is -3, cuz there is the .(Thumbs, htacces), ..,which we dont count in...
//loop through the directory
while (false !== ($file = readdir($handle)))
{
$count++;
}
echo $count;
echo " registered characters!";
?>
PHP Code:
<iframe src="http://YOUREXTERNALIPHERE/count.php" frameborder="0" height="100" width="100%" scrollable="no"> Your Browser Does not support iframes!</iframe>
Any questions, suggestion, post it!
If you like it, push the button! (Thanks button)


__________________