Results 1 to 10 of 31
Hybrid View
-
8th Jul 2010, 02:32 PM #1OPMemberWebsite's:
maxneeds.info$entry_arrayz[ 'entry' ] is the field where everything will print.
I am using now :
PHP Code:function RecurseFolderLister($d)
{
$BasePath = realpath($d);
$Storage = array();
if(is_dir($BasePath))
{
$resource = opendir($BasePath);
while(false !== ($directory = readdir($resource)))
{
if(is_dir($BasePath . '/' . $directory) && !in_array($directory,array('.','..'))) //DirCheck the TypeCheck
{
$Storage = array_merge($Storage,RecurseFolderLister($BasePath . '/' . $directory));
}else
{
if(is_file($BasePath . '/' . $directory) && substr($directory,-3) == 'txt')
{
//We have text file
$key = ($BasePath . '/' . $directory);
if(!isset($Storage[$key]))
{
$Storage[$key] = 0;
}
$Storage[$key]++;
}
}
}
}
return $Storage;
}
$Storage = RecurseFolderLister('fav');
asort($Storage);
$i = 0;
foreach( array_reverse($Storage) as $filename => $total )
{
$entry_arrayz[ 'entry' ] .= file_get_contents($filename) . '('.$total.')' ;
$i++;
if($i == 10) break;
}
I must get TEST(2) TEST2(1)
And really thanks for your help so far !Porsche_maniak Reviewed by Porsche_maniak on . PHP Scan dir for idetical files I am not good with php and will ask for help... * The folder is named 'fav' * There are subfolders in 'fav' * Each subfolder may contain a .txt file Needed --> * Check for identical .txt file names in all subfolders * Sort 10 most repeating identicals,show(echo) their contents and show(echo) times repeated (in brackets such as this one :D ) Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
[PHP] Scan a Website using CURL and PHP, using Sucuri SiteCheck
By _Vick in forum Web Development AreaReplies: 0Last Post: 30th Nov 2011, 03:02 AM -
Scan Forum Ids
By vietnammoney in forum Webmaster ResourcesReplies: 1Last Post: 12th Oct 2011, 05:36 PM -
Boot Time Scan In Quick Heal
By supernova in forum General DiscussionReplies: 5Last Post: 17th Mar 2011, 08:07 PM -
Always scan files befor opeing...
By MrPeanut420 in forum Useful SitesReplies: 3Last Post: 5th Feb 2010, 09:57 AM -
How to Scan & Stop Uploading Infected Files to Your Server
By ashutariyal in forum Tutorials and GuidesReplies: 8Last Post: 13th Aug 2009, 06:09 AM
themaLeecher - leech and manage...
Version 5.04 released. Open older version (or...