> Ermmm - isn't the 2002 bit hardcoded in the code above ? So how can it
> be wrong ?
Well its not wrong just lazy on my part, I just need to examine each
IP to make sure its not on the reserved list, if it is replace the
2002 with the correct one (usually FFFF). Should be easy to do, but I
am going to try and advoid pcre if possible.
> Indeed it can be compressed to '1' - same way as in IPv4 '127.000.000.001'
> gets compressed down to '127.0.0.1'
I am lazy and if I can get away with it maybe I'll leave it like
that... on reflection tho, I suppose I should save some space in my DB
when I can too. :) So ok, I can work on compressing it.
> Or you could you install ipv6calc and use it:
>dave at freyja:~$ ipv6calc --ipv4_to_6to4addr 127.0.0.1
Yes, but using PHP I would have to call exec, somthing I don't want to
do. However I am feeling brave and I may try and intergrate this into
a PHP module at some stage, would be handy I think, especially seeing
as its going to become more and more important. AFAIK the source of
ipv6calc is OSS.
Thanks for the help
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!