note 90074 added to function.gethostbyaddr

From: Date: Sun, 05 Apr 2009 01:24:18 +0000
Subject: note 90074 added to function.gethostbyaddr
Groups: php.notes 
Request: Send a blank email to php-notes+get-152822@lists.php.net to get a copy of this message
to respond to the anonymous post bellow (see -> http://fr.php.net/manual/fr/function.gethostbyaddr.php#88920) stock addr is only usefull on an admin interface it's right but maybe for tests can you use a function like this to stop it, or if we have a so rare but existing stolen ip: function test_addr($Vip) { $addr = gethostbyaddr($Vip); return $addr; } $start_addr = microtime(); $addr = empty(test($Vip)) && microtime()-$start_addr > '500' ? '' : gethostbyaddr($Vip); $user_addr = empty($addr) ? 'unknown' : substr($addr,strlen($Vip)+'1',strlen($addr)); in any case stock it can be usefull in the future... ---- Server IP: 89.31.146.176 Probable Submitter: 87.231.189.234 ---- Manual Page -- http://www.php.net/manual/en/function.gethostbyaddr.php Edit -- https://master.php.net/note/edit/90074 Del: integrated -- https://master.php.net/note/delete/90074/integrated Del: useless -- https://master.php.net/note/delete/90074/useless Del: bad code -- https://master.php.net/note/delete/90074/bad+code Del: spam -- https://master.php.net/note/delete/90074/spam Del: non-english -- https://master.php.net/note/delete/90074/non-english Del: in docs -- https://master.php.net/note/delete/90074/in+docs Del: other reasons-- https://master.php.net/note/delete/90074 Reject -- https://master.php.net/note/reject/90074 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#152822) next »