[PHP] Re: remote directorylisting

2001-12-06 Thread Håkon Grønning

Thanks!

Thanks for your answer. It was like I thought. I have to write my own
parse code.


Håkon (Hakon)


> Well, This is not really possible, unless the server itself allows you to do
> the listing.
> One way and after the last condition you can use
> fopen("sever.com/dir_to_list/") then fread() it and then parse the content
> in order to get filename, date, ...
> 
> "Håkon grønning" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Does anybody know how to list a remote directory to get
> > all the filenames into for example an array?
> >
> > This is easily done on your local server by:
> >  $handle=opendir('./images/');
> >  while (($file = readdir($handle))!==false) {
> >  $filelist[] = $file;
> >  }
> >  closedir($handle);
> >
> > However, opendir and readdir does not work on remote
> > servers: $handle=opendir('http://www.somesite.net/images/');
> >
> > So, does anybody know how to do this.
> > I know I can read remote files (directory listing) and then
> > To analyse this for filenames with a lot of string manipulation
> > operations. Is there a simpler approach?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: remote directorylisting

2001-12-05 Thread lallous

Well, This is not really possible, unless the server itself allows you to do
the listing.
One way and after the last condition you can use
fopen("sever.com/dir_to_list/") then fread() it and then parse the content
in order to get filename, date, ...

"Håkon grønning" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Does anybody know how to list a remote directory to get
> all the filenames into for example an array?
>
> This is easily done on your local server by:
>  $handle=opendir('./images/');
>  while (($file = readdir($handle))!==false) {
>  $filelist[] = $file;
>  }
>  closedir($handle);
>
> However, opendir and readdir does not work on remote
> servers: $handle=opendir('http://www.somesite.net/images/');
>
> So, does anybody know how to do this.
> I know I can read remote files (directory listing) and then
> To analyse this for filenames with a lot of string manipulation
> operations. Is there a simpler approach?
>
>
> Håkon Grønning
> E-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]