Show total links protected (Protected Links)
Posted:
Wed Feb 18, 2015 1:32 pm
by thcnetwork
Hi,
I Whant to show on my frontpage how many URLS have been protected.
What code do i need for that since there is no DB ?.
Regards
Re: Show total links protected (Protected Links)
Posted:
Sun Feb 22, 2015 6:47 pm
by SamEA
You can use the below code anywhere in the root directory of DLP and it should show the total number of protected links:
- Code: Select all
<?php
$sizehosted = 0;
$handle = opendir("./files/");
while($file = readdir($handle)) {
if(($file != '..')&&($file != '.')&&($file != '.htaccess'))
{
$sizehosted++;
}
}
echo "Total number of protected links: " .$sizehosted;
?>
Re: Show total links protected (Protected Links)
Posted:
Sat Apr 11, 2015 1:47 pm
by sonLP
SamEA wrote:You can use the below code anywhere in the root directory of DLP and it should show the total number of protected links:
thanks for this code SamEA