Jump to content

opendir() question


Matt.F

Recommended Posts

Simple question I think, but the php.net description of this function was a bit confusing. Is it possible to use opendir() to open an http URL instead of a folder on the local server. When I try, I get the following error: "failed to open dir: not implemented"

The problem is this: my host requires that any media file be uploaded to a separate server and not the normal FTP. I am trying to implement a podcast system, but to list the files in the back-end the extension I am using uses opendir(). Since the files can not be hosted on the local server, I have to open a URL. Is this possible?

Sorry if it's been answered already, but I searched and couldn't find anything to help answer my question. Thanks so much for any help.

Regards,
[b]Matt[/b]
Link to comment
https://forums.phpfreaks.com/topic/4672-opendir-question/
Share on other sites

The short answer is no, you must open directories on the local server. You could, however, use the FTP functions in PHP to connect to your other server via FTP in the specified directory and get a directory list. It is just a thought and the only possible solution that springs to mind. There might be others, but I can't think of any right now.
Link to comment
https://forums.phpfreaks.com/topic/4672-opendir-question/#findComment-16373
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.