Jump to content


directory contents via http

  • Please log in to reply
2 replies to this topic

#1 amosglenn

  • Members
  • Pip
  • Newbie
  • 2 posts

Posted 08 May 2006 - 11:53 AM


I'm working on a "connector form" that will ask the user for a url, fetch the contents of that page, replace all the instances of a list of words with links, and write a new file for the user to upload. It's working pretty well so far, but I want to add the ability to give the form a directory (instead of a file) and have it return with a list of files in that directory.

I'm learning a bit of cURL for talking to ther other server via http, but I'm just beginning to learn how to use that library. It seems doable with ftp, but my form doesn't have ftp access to the other servers. I've searched through the php manual and the cURL help, but haven't found any information (or at least information I understand).

Is there a way for http to tell you the names of the files with a directory? Files within directories within directories would be even better.

Is this possible? Can you point me to a place to learn this?


#2 ober

  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 08 May 2006 - 02:24 PM

I'm not sure that's even possible. You have to have the ability to run filesystem functions on the server you're talking to, and I'm about 95% sure you'll have to be running your scripts on that specific server instead of against it.

Info: PHP Manual

#3 amosglenn

  • Members
  • Pip
  • Newbie
  • 2 posts

Posted 08 May 2006 - 02:42 PM

My continuing research is telling me the same thing: it will work for files and directories on the same server, but not on a different server. Too bad.
Thanks for the response.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users