fishhead32
02-06-2003, 05:31 PM
Is there a way, in .asp or maybe .NET, to get the last modified date of a webpage on a remote computer so that you could display when another website is updated
|
Click to See Complete Forum and Search --> : last modified date on a remote computer file fishhead32 02-06-2003, 05:31 PM Is there a way, in .asp or maybe .NET, to get the last modified date of a webpage on a remote computer so that you could display when another website is updated Ribeyed 02-07-2003, 08:43 AM hi, not sure if this possible. I don't know of any code that automatically retrieves this. If i wanting to work with the last modified date I would have some code on the page that would write the date and time to a database and store it against that page. On the page If I was wanting to retrieve the last modified date and time then I would call it from the database. Unless I had access to the database or even the code of the page on the remote computer then I see no way of retrieving this information. Hope this helps you find an answer. elbootio 03-01-2006, 12:51 PM This can be done using the XMLHTTPRequest object, use this code: Set xmlhttp = Server.CreateObject("Microsoft.XMLHTTP") xmlhttp.open "GET", URL, False xmlhttp.send "" Response.Write xmlhttp.getResponseHeader("Last-Modified") However, there is supposed to be a better way, that will download just the headers, but I have not been able to get this method to work. All you should have to do is change one variable: xmlhttp.open "HEAD", URL, False But every time I've tried to do this I get a timeout error, if anyone has some idea why this isn't working for me, please help. russell_g_1 03-01-2006, 04:20 PM .net has a sort of equivalent class called webrequest and another called webresponse to do something similar. webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |