Results 1 to 4 of 4

Thread: php file scan help

  1. #1

    php file scan help

    Hi again my action script file loads an XML file, dynamically created with PHP and php scans the mp3/a directory and creats list files and folders in tree component of flash using as script.

    its scans mp3/a/ dir and folders and files in it(mp3/a/50z/candyshop.mp3) but if e.g. i have mp3/a/50z/2005 album/indaclub.mp3 it doesnot scun it. can someone modifi this script?i whant to scan with it mp3/a/50z/ subfolders and sub files too.can someone do this? thanks

    here is php script

    PHP Code:
    <?php
    $dir 
    "mp3/a/";



    echo 
    "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n";
    echo 
    "<music>\n";

    // Open a known directory, and proceed to read its contents
    if (is_dir($dir)) {
        if (
    $dh opendir($dir)) {
            while ((
    $file readdir($dh)) !== false) {
             
    $subdir $file;         
             if (
    $subdir != "." && $subdir != ".." && $subdir != "_notes") {
                echo 
    "<artist label=\"$subdir\" >\n";
                
    //Scan the subdirectories
                
    if ($sh opendir($dir $subdir."/")) {
                   while ((
    $sfile readdir($sh)) !== false) {
                   if (
    $sfile != "." && $sfile != "..") {
                     
    $subfile $sfile;
                         echo 
    "<song url=\"$dir$subdir/$subfile\" label=\"" $subfile "\" />\n";  
                      
                      }
                      
                   }
                   
    closedir($sh);
                
                }
                echo 
    "</artist>\n";         
             
             }         
             
            }
            
    closedir($dh);
        } 
    }
    echo 
    "</music>"
    ?>

  2. #2
    maby its inpossible?

  3. #3
    It's not impossible, it's prolly more of a case in the way you "asked". You just said do it for you... not help, things like that. Wording is important when you no one can see u. Also, it seems like a lot of work and not everyone likes giving away work
    Let us live so that when we come to die even the undertaker will be sorry. - Mark Twain
    Don't PM me your CSS, xHTML, JS or PHP questions. I will not reply to ANY IE6 questions.

  4. #4
    ok if someone do it for me it will be super .i thought it was inpossible .if someone have time to do this please help i will wait

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012