Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Geting a file list from a HTTP server.

219 views
Skip to first unread message

Np. v/d Spek

unread,
Nov 5, 2000, 3:00:00 AM11/5/00
to
Hello,
I like to get a list of files from a Http server.
Is this posible? So yes, How can i do this.

Thanks
Niels

Hadi Hariri - Team Indy

unread,
Nov 6, 2000, 3:00:00 AM11/6/00
to
ne...@lumensoft.nl (Np. v/d Spek) wrote in <8u4o0f$2cd2
@bornews.borland.com>:

>Hello,
>I like to get a list of files from a Http server.
>Is this posible? So yes, How can i do this.
>

If the server has directory listings activated then retriving a folder w/o
a default webpage will give you a list of the directories.

--
Hadi Hariri
http://delphi.urusoft.com

Np. v/d Spek

unread,
Nov 6, 2000, 3:00:00 AM11/6/00
to
Thanks,
Only the server has a default webpage. Is there a other way to get the list?
I know that Frontpage can import a webspace.
So there must by a other way. but how?

Thanks,

Niels

"Hadi Hariri - Team Indy" <ha...@delphihome.com> schreef in bericht
news:8FE467139...@207.105.83.62...

Christian

unread,
Nov 6, 2000, 3:00:00 AM11/6/00
to
Connet to it via ftp and get all the folder/file...


"Np. v/d Spek" <ne...@lumensoft.nl> wrote in message
news:8u4o0f$2c...@bornews.borland.com...


> Hello,
> I like to get a list of files from a Http server.
> Is this posible? So yes, How can i do this.
>

> Thanks
> Niels
>
>

Hadi Hariri - Team Indy

unread,
Nov 6, 2000, 3:00:00 AM11/6/00
to
ne...@lumensoft.nl (Np. v/d Spek) wrote in
<8u5vmf$dp...@bornews.borland.com>:

>Thanks,
>Only the server has a default webpage. Is there a other way to get the
>list? I know that Frontpage can import a webspace.
>So there must by a other way. but how?
>

You can use FTP. I don't know of any HTTP command that allows this. I think
the way FP works is contacting the FrontPage Extensions on the server. Does
FP still work if FPExtensions aren't installed on the server?

Np. v/d Spek

unread,
Nov 6, 2000, 3:00:00 AM11/6/00
to

"Hadi Hariri - Team Indy" <ha...@delphihome.com> schreef in bericht
news:8FE49E7C1...@207.105.83.62...
Yes, I Know for sure that on my Webserver (Located by my ISP) no FP
extentions are
running. So there must by a other way to get the files.I have loking to the
Robot technolgie, but can't find any source example.

M.Schröder

unread,
Nov 7, 2000, 3:00:00 AM11/7/00
to
I'm not sure, but i think the only way is to parse the HTML-Documents, i've
just written such a program. A good starting-point for that is Tspider, a
freeware component written by Gordon Hamm. It has some errors (links like
../../test/test.html may lead into endless loops) and it uses Hyperstr,
which i dont like.

just look for the links - <a href=....> ignore fragments (...#mark) and
typical unique ID's ....?rnd=123 or ?id=123 when necassary.

I can mail some code-fragments which do quiet well for - just ask.

But when you want a good solution - use (and buy ;-) ) programs like
Webspider...

Matthias Schroeder (EDV)
Soft-Impulse
--------------------------------------------------------------
ne...@soft-impulse.de
Tel: +49 - 234 - 941 33 00
Fahrenheitsstrasse 40 * D-44879 Bochum * Germany

"Np. v/d Spek" <ne...@lumensoft.nl> schrieb im Newsbeitrag
news:8u6jcd$ir...@bornews.borland.com...

Arthuro

unread,
Nov 8, 2000, 3:00:00 AM11/8/00
to
"Np. v/d Spek" <ne...@lumensoft.nl> wrote in message
news:8u6jcd$ir...@bornews.borland.com...

> Yes, I Know for sure that on my Webserver (Located by my ISP) no FP
> extentions are
> running. So there must by a other way to get the files.I have loking to
the
> Robot technolgie, but can't find any source example.

Frontpage uses FTP to do this, there is nothing in the HTTP protocol that
provides this.

Regards,
Arthuro.

Joachim Breuer

unread,
Nov 8, 2000, 3:00:00 AM11/8/00
to

> Frontpage uses FTP to do this, there is nothing in the HTTP protocol that
> provides this.
>
> Regards,
> Arthuro.

It seems that the WinInet-function "InternetFindNextFile" provides a way
even under HTTP. But I was not able to put the pseudo-code provided by MS
into Delphi.

http://support.microsoft.com/support/kb/articles/Q166/9/61.ASP?LN=EN-US&SD=g
n&FR=0
http://msdn.microsoft.com/workshop/networking/wininet/reference/functions/In
ternetFindNextFile.asp

Regards,
Joachim


Arthuro

unread,
Nov 9, 2000, 3:00:00 AM11/9/00
to
"Joachim Breuer" <bre...@sidomo.de> wrote in message
news:3a09bbe5_1@dnews...

>
> > Frontpage uses FTP to do this, there is nothing in the HTTP protocol
that
> > provides this.
>
> It seems that the WinInet-function "InternetFindNextFile" provides a way
> even under HTTP. But I was not able to put the pseudo-code provided by MS
> into Delphi.
>
>
http://support.microsoft.com/support/kb/articles/Q166/9/61.ASP?LN=EN-US&SD=g
> n&FR=0
>
http://msdn.microsoft.com/workshop/networking/wininet/reference/functions/In
> ternetFindNextFile.asp
>

As i read the first article, i see that there is an HTTP GET sent which
contains a FTP request as it's parameter. So what really happens is you're
doing FTP over HTTP, the server on the other side looks at the parameter in
GET, interprets it, sets up a FTP session, sends the result back over HTTP.
In essence you're piggybacking FTP data on a HTTP packet.
WinInet is a Windows API and has nothing to do with HTTP, but it might be
altogether possible that a webserver uses this Windows API to access files
but that doesn't make the API HTTP protocol, it's just a possible means of
implementation.

Regards,
Arthuro..

Joachim Breuer

unread,
Nov 9, 2000, 3:00:00 AM11/9/00
to
> As i read the first article, i see that there is an HTTP GET sent which
> contains a FTP request as it's parameter. So what really happens is you're
> doing FTP over HTTP, the server on the other side looks at the parameter
in
> GET, interprets it, sets up a FTP session, sends the result back over
HTTP.
> In essence you're piggybacking FTP data on a HTTP packet.
> WinInet is a Windows API and has nothing to do with HTTP, but it might be
> altogether possible that a webserver uses this Windows API to access files
> but that doesn't make the API HTTP protocol, it's just a possible means of
> implementation.
>
> Regards,
> Arthuro..
>

I am new to WinInet, FTP, HTTP and all those things, so I mixed up some of
them. I only want to get the file date of a file before the actual download
starts and I don`t want to use FTP. I looked for components or API-functions
but the only one I found was InternetFindNextFile mentioned in the article
from MS. I still don't know how to use this function and it seems no one can
help me. But after I had read your news, I did read the MS-article again and
found a solution to my problem which also concerns the topic "Geting a file
list from a HTTP server.".

http://support.microsoft.com/support/kb/articles/Q166/9/61.ASP?LN=EN-US&SD=g
n&FR=0
> If the FTP URL passed in InternetOpenUrl is a URL to a directory on the
FTP server, InternetReadFile retrieves a directory listing of the FTP URL as
a HTML document.

So when I use InternetOpenUrl and InternetReadFile I get the file list from
the specified HTML-directory.

Thank you.

Joachim


Arthuro

unread,
Nov 10, 2000, 3:00:00 AM11/10/00
to

"Joachim Breuer" <bre...@sidomo.de> wrote in message
news:3a0afb60_2@dnews...
[Snip]

> I am new to WinInet, FTP, HTTP and all those things, so I mixed up some of
> them. I only want to get the file date of a file before the actual
download
> starts and I don`t want to use FTP. I looked for components or
API-functions
> but the only one I found was InternetFindNextFile mentioned in the article
> from MS. I still don't know how to use this function and it seems no one
can
> help me. But after I had read your news, I did read the MS-article again
and
> found a solution to my problem which also concerns the topic "Geting a
file
> list from a HTTP server.".
>
>
http://support.microsoft.com/support/kb/articles/Q166/9/61.ASP?LN=EN-US&SD=g
> n&FR=0
> > If the FTP URL passed in InternetOpenUrl is a URL to a directory on the
> FTP server, InternetReadFile retrieves a directory listing of the FTP URL
as
> a HTML document.
>
> So when I use InternetOpenUrl and InternetReadFile I get the file list
from
> the specified HTML-directory.

This does what you want, but not the way you want it. You state that you


don't want to use FTP.

But the article says the following:
'When the connection between the client and the FTP server is direct or via
a TIS FTP proxy, InternetOpenUrl and InternetReadFile are actually
generating FTP traffic rather than HTTP traffic.'

Hope this sheds some light on the case.

Regards,

Arthuro.

0 new messages