in reply to create filename from IP#
If you really must convert IP addresses to filenames, don't simply drop the period. If you do, you've introduced the equivalent of a hash collision, and can't tell whether "12345" came from 1.2.3.45, 1.2.34.5, 1.23.4.5, or 12.3.4.5.
Re: Re: create filename from IP#
by sauoq (Abbot) on Nov 26, 2003 at 20:41 UTC
|
you've introduced the equivalent of a hash collision
I think he was hoping to convert his filenames to 3 digits per octet in order to avoid that exact problem. Of course, removing the dots first won't work. And I don't understand why he'd remove the dots to "change it to a proper filename". An IP would make a fine filename, I'd think.
Shrug. As others have pointed out, this isn't likely to be an effective approach to his problem anyway because a requestor's IP can change from request to request and an IP may be shared among many requestors.
-sauoq
"My two cents aren't worth a dime.";
| [reply] |
|