note 57163 added to function.filemtime

From: Date: Sun, 25 Sep 2005 22:39:37 +0000
Subject: note 57163 added to function.filemtime
Groups: php.notes 
Request: Send a blank email to php-notes+get-95773@lists.php.net to get a copy of this message
There are a couple of things to point out about the otherwise great example posted by "notepad at codewalkers dot com". First of all, as "dma05 at web dot de" pointed out, use HEAD instead of GET - that's being nice to your fellow man. Second, it will only allow communication on port 80. That can easilly be solved. <?php function remote_filemtime($url) { $uri = parse_url($url); $uri['port'] = isset($uri['port']) ? $uri['port'] : 80; $handle = @fsockopen($uri['host'], $uri['port']); // ... } ?> But hey, thanks a lot for the function! I've really had great use of it. ---- Manual Page -- http://www.php.net/manual/en/function.filemtime.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+57163 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+57163&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+57163&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+57163&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+57163&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+57163&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+57163&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+57163&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+57163&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#95773) next »