Show total links protected (Protected Links)

All support enquiries for other DaddyScripts' scripts go in here...

Show total links protected (Protected Links)

Postby thcnetwork » Wed Feb 18, 2015 1:32 pm

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
thcnetwork
Newbie Member
 
Posts: 1
Joined: Tue Oct 08, 2013 11:43 am

Re: Show total links protected (Protected Links)

Postby SamEA » Sun Feb 22, 2015 6:47 pm

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;

?>
SamEA,
DaddyScripts' Admin & Developer.

Require a PHP or general IT freelancer? Don't hesitate to PM me.
User avatar
SamEA
Site Admin
 
Posts: 1165
Joined: Sat Feb 19, 2011 7:51 pm

Re: Show total links protected (Protected Links)

Postby sonLP » Sat Apr 11, 2015 1:47 pm

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
User avatar
sonLP
Premium
 
Posts: 21
Joined: Sat Oct 04, 2014 3:13 am

Re: Show total links protected (Protected Links)

Postby SamEA » Fri Apr 17, 2015 7:53 am

No problem sonLP. :)
SamEA,
DaddyScripts' Admin & Developer.

Require a PHP or general IT freelancer? Don't hesitate to PM me.
User avatar
SamEA
Site Admin
 
Posts: 1165
Joined: Sat Feb 19, 2011 7:51 pm


Return to Other DS Scripts!

Who is online

Users browsing this forum: No registered users and 1 guest

cron