Robson » Code » PHP » Dab Tlc

       Total Link Counter 1.0
       The purpose of this script is to automate counting of all the link
         numbers on the page of 'dab pages with links' of Wikipedia.
       1. Copy the section into a text file called 'dablinks.txt'.
       2. Run this script from the same folder.
       3. It will display the total of all the links counters.
   // load all the lines of the file
   $todo = file('dablinks.txt');
   // loop through each line
   foreach($todo as $line)
       // add the link counter to the running total
       $total += eregi_replace(".*: ([0-9]+) .*", "\\1", $line);
   // output the total
   echo $total;
© 2004-19 robson | cc unless stated