Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Help with listing a remote directory using PHP
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Help with listing a remote directory using PHP
Help with listing a remote directory using PHP
10-10-2009 9:33 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Can anyone give me some pointers on how to generate a list of files in a nominated directory in my main (force9) web space and save that list as a text file in the same directory?
The reason I want to do this is so that a Flash movie (a slideshow) can then read the file list and load in the files (which will all be jpgs).
I know I don't have to do this - I already have the slideshow working by making sure all the jpgs are numbered consecutively and then just manually telling the Flash movie how many there are - what I really want to do is get a bit cleverer than that so I can have the movie load an arbitrary collection of filenames.
It has been suggested to me that a PHP script could generate the file list for me, but I've not done any PHP work before and I can't work out how I can specify the path from a PHP script on the CGI server to the directory on my main web site.
Is this a more complex problem than I'm assuming? Any help would be appreciated.
Phil
The reason I want to do this is so that a Flash movie (a slideshow) can then read the file list and load in the files (which will all be jpgs).
I know I don't have to do this - I already have the slideshow working by making sure all the jpgs are numbered consecutively and then just manually telling the Flash movie how many there are - what I really want to do is get a bit cleverer than that so I can have the movie load an arbitrary collection of filenames.
It has been suggested to me that a PHP script could generate the file list for me, but I've not done any PHP work before and I can't work out how I can specify the path from a PHP script on the CGI server to the directory on my main web site.
Is this a more complex problem than I'm assuming? Any help would be appreciated.
Phil
Message 1 of 2
(841 Views)
1 REPLY 1
Re: Help with listing a remote directory using PHP
11-10-2009 3:17 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
You could use Curl to get a listing (by http, if your dir doesn't have an index file or an IndexIgnore, or ftp if it does). I don't use Flash, but I think you then have to add ccgi to your crossdomain file.
Gabe
Gabe
Message 2 of 2
(186 Views)
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Help with listing a remote directory using PHP