Page 1 of 1

Show total links protected (Protected Links)

PostPosted: 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)

PostPosted: 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)

PostPosted: 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

Re: Show total links protected (Protected Links)

PostPosted: Fri Apr 17, 2015 7:53 am
by SamEA
No problem sonLP. :)