Jump to content


Photo

opendir() question


  • Please log in to reply
5 replies to this topic

#1 Matt.F

Matt.F
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 11 March 2006 - 07:01 AM

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,
Matt

#2 txmedic03

txmedic03
  • Members
  • PipPipPip
  • Advanced Member
  • 313 posts
  • LocationCall, TX, USA

Posted 11 March 2006 - 08:17 AM

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.

SEMPER FIDELIS!

I can't stop you from doing something silly, but at least I can help you do it right.


#3 Matt.F

Matt.F
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 11 March 2006 - 10:18 PM

Sounds like a lot of work to recode the component to work off an FTP instead of the local server. Any easier way to do it?

#4 High_-_Tek

High_-_Tek
  • Members
  • PipPipPip
  • Advanced Member
  • 72 posts

Posted 12 March 2006 - 03:58 AM

Yea,

Hire someone to do it for you :P

#5 Matt.F

Matt.F
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 12 March 2006 - 04:36 AM

Hehe. I'd love to, but unfortunately that's just not an option. I guess I'll just have to see it through.

Thanks for the help!

#6 txmedic03

txmedic03
  • Members
  • PipPipPip
  • Advanced Member
  • 313 posts
  • LocationCall, TX, USA

Posted 12 March 2006 - 05:29 AM

Well, the only thing I can say is I would be happy to answer questions on the PHP FTP functions.

SEMPER FIDELIS!

I can't stop you from doing something silly, but at least I can help you do it right.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users