0 Replies Latest reply on Nov 6, 2010 9:27 PM by jeffcg2

    php directory list as Flex data service

    jeffcg2 Level 1

      PHP is not my scripting language, but I'm looking to use a directory listing as a source for a photo album data service. I found that the script below will give me a listing of the directory and show the pictures in that directory. Now where I want to go is create a php webservice to use this as a data/service in Flash Builder 4.

       

      I haven't been able to find any examples so far. Any examples would be appreciated.

       

      <?php
      $dir = opendir ("photos");
              while (false !== ($file = readdir($dir))) {
                      if (strpos($file, '.gif',1)||strpos($file, '.jpg',1) ) {
                          echo "<img src=/photos/$file> <br />";
                      }
              }
      ?>