My dev and test tools are windows based and the apps deployed on linux, and
it's been working well. But moving to win7 created problems because it uses
ipv6 and code for ratings is for ipv4. Specifically, using ip2long to save
the ip as an int (to prevent duplicate votes) doesn't work in test
(win7/php5.3). I've got a quick-n-dirty workaround ("::1" converted to "0")
but it seemed a good opportunity to add code to handle ipv6 properly when
it's deployed.

I found a reference to do that in the help
(, but the referenced site no
longer exists. I also found a page where Daniel Brown mentions that user
notes referencing external sites are normally removed
x.html) but that the note added enough value to make an exception. I'd be
very grateful if anyone could please point me to any other record of this
code, or could post it if they have a copy.

Also, I'm assuming the code returns 2 ints because of the size of ipv6, and
it's fine to change my code to store that, but I'd like to know if there's a
standard way to store ip addresses in sql for quick lookup?


PHP General Mailing List (
To unsubscribe, visit:

Reply via email to