[Gambas-user] best way to monitor remote URL/file in gambas2
Doriano Blengino
doriano.blengino at ...1909...
Tue Oct 13 15:46:46 CEST 2009
M0E Lnx ha scritto:
> Exacly, so I would very much rather not have to jack with a generated index.html
>
> I was thinking maybe the gambas http client had some useful
> functionality for this matter. But i've never used it.
>
> For ftp sites for example, curl works perfectly for what I need... for
> instance,
>
> SHELL curl -l ftp://ftp-osl.osuosl.org TO sRes
>
> That will show a listing similar to the output of ls on a local
> directory. I can work with that. But I need a similar functionality
> for http URIs too, not just FTP
>
It is not clear to me what you are saying. You don't want an index.html,
but "curl -l" does exactly that, only less formatted - but you don't
parse it, you just want to compare it with a previous version. Or not?
Anyway, HTTP is not FTP, and not you, not me, not gambas can do
something about that.
Please note that asking an ftp server to generate a listing is not a
guarantee - every server can do whatever it want with its listing, just
like an http server. The listing can come out sorted, not sorted, with
or without added comments (550 - xxxx) and so on. The listing often
seems "normal" because unix tends to simply launch a /bin/ls, but this
can not be held always for true.
At least HTTP *has* a way to know if something has been changed since a
date, while ftp does not.
So there are still only two possibilities - 1) ask for modifications, or
2) determine them by yourself.
Regards,
Doriano
More information about the User
mailing list