Jump to content

Archived

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

amosglenn

directory contents via http

Recommended Posts

Hi-

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?

Thanks!

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

×

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.