note 79887 added to function.gethostbyaddr

From: Date: Tue, 18 Dec 2007 04:12:52 +0000
Subject: note 79887 added to function.gethostbyaddr
Groups: php.notes 
Request: Send a blank email to php-notes+get-133744@lists.php.net to get a copy of this message
I just spent a dickens of a time trying to figure out why my gethostbyaddr's were simply failing halfway through. I'm returning a log of page visits, and with each new IP, I wanted to pull the hostname of the IP. On each report page, I'm pulling 500 lines from my Db, but only maybe 25 IPs on average. Sometimes this report would generate in under 15 seconds, other times it would fail with a connection reset. It turns out that several of the IPs in my Db looked like this: x.255.x.x. gethostbyaddr really hates that and simply dies when it reaches one of these IPs. For my case, I purged the Db and prevented the logging of IPs that contain 255. ---- Server IP: 209.41.74.194 Probable Submitter: 70.170.32.108 ---- Manual Page -- http://www.php.net/manual/en/function.gethostbyaddr.php Edit -- https://master.php.net/note/edit/79887 Del: integrated -- https://master.php.net/note/delete/79887/integrated Del: useless -- https://master.php.net/note/delete/79887/useless Del: bad code -- https://master.php.net/note/delete/79887/bad+code Del: spam -- https://master.php.net/note/delete/79887/spam Del: non-english -- https://master.php.net/note/delete/79887/non-english Del: in docs -- https://master.php.net/note/delete/79887/in+docs Del: other reasons-- https://master.php.net/note/delete/79887 Reject -- https://master.php.net/note/reject/79887 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#133744) next »