Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Last update of an external URL (like javascript document.LastUpdate())

Status
Not open for further replies.

celebx

Programmer
Feb 15, 2005
1
NL
Is it possible to obtain the information in PHP?
 
There is, to the best of my knowledge, no equivalent functionality provided by a single function call in PHP. Although PHP supports opening some URLs as files (depending on your PHP installation's configuration), PHP's stat() function cannot work on them.

It should be possible to create your own function. It could fetch the HTTP headers returned by the server at the URL and then look for a "Last-Modified" header. This will be available for static HTML files, but likely not for the output of scripts. You should be able to use cURL, fopen with a URL stream, or fsockopen to get this information.

Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top