M0E Lnx ha scritto: > All I want is to compare the contents. For exmple, say yesterday I > checked ftp://ftp-osl.osuosl.org and it reported this > foo/ > bar/ > > And today, I check again and it has > foo/ > bar/ > foo-bar-1.0.tar.gz > > I Want to be able to detect the new "foo-bar-1.0.tar.gz" > Yes, this is clear. What was not clear was your last mail, where you said a thing and nearly the contrary.
Back to the topic. There are two ways to do it in http. One is to GET the url, and compare the result (a stream of characters) with a previous copy. It should work pretty the same as ftp, but clearly you can use a browser, point it to your url, and see for yourself what the result is. I think the result should be a listing, just the same as ftp (only some html tag added to beautify). Look if there is some footer like "Generated by Apache on blah blah blah", where "blah blah blah" could be a date; that footer can be a problem and should be discarded if it contains a date. The other way is to use the "/If-Modified-Since"/ http header, or other http functionalities (sorry, don't have the docs at hand). This involves no data transfer - the client asks the server if an URI has been modified *after* a certain timestamp. This is exactly what you want, in the most effective way. If your URI refers to a listing of files, then this facility would say you if the listing has been modified (some files were be added, deleted, modified) after a certain date. Both the methods must be verified (by you, in your context); I don't know how to implement them in gambas - never used such component. But if you know what you want, then someone else can explain you what to do in gambas. Regards, Doriano ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Gambas-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gambas-user
