note 52191 added to function.filemtime

From: Date: Sat, 23 Apr 2005 21:25:50 +0000
Subject: note 52191 added to function.filemtime
Groups: php.notes 
Request: Send a blank email to php-notes+get-88456@lists.php.net to get a copy of this message
concerning "notepad at codewalkers dot com"'s code: this code is pretty neat, but i just wanted to note that using the "HEAD"-method instead of the "GET"-method in the http-request might be preferrable, since then not the whole resource is being downloaded... http/1.1 definiton snippet: Section "9.4 HEAD" The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response. The metainformation contained in the HTTP headers in response to a HEAD request SHOULD be identical to the information sent in response to a GET request. This method can be used for obtaining metainformation about the entity implied by the request without transferring the entity-body itself. This method is often used for testing hypertext links for validity, accessibility, and recent modification. [...] -- snippet end --- the code would then be...: -- snippet --- fputs($handle,"HEAD $uri[path] HTTP/1.1\r\nHost: $uri[host]\r\n\r\n"); -- snippet end --- regards, Magnus ---- Manual Page -- http://www.php.net/manual/en/function.filemtime.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+52191 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+52191&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+52191&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+52191&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+52191&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+52191&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+52191&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#88456) next »