at the top of this message, next to the "Author: Craigh" is 66.188.16.207.bay.mi.chartermi.net
I recognize the first part as my IP... what is the second part?
thanks.
craig
its how your isp has reverse dns setup. your ip resolves to "66.188.16.207.bay.mi.chartermi.net" and it makes it easy to see where you're connecting from.
all of that is returned by $REMOTE_ADDR ? the numbers "66.188.16.207" and "bay.mi.chartermi.net" ?
No, REMOTE_ADDR just returns '66.188.16.207'.
It's the DNS that returns '66.188.16.207.bay.mi.chartermi.net' as the hostname for that ip:
echo gethostbyaddr('66.188.16.207');
isn't it quite inefficient to run lookups on ever ip address? I guess they could be cached, but it's still quite a bit of work isn't it?
It can be quite slow at times, but most of it is cached after the first request, and the cache is only refreshed once or twice a day.
would this (bay.mi.chartermi.net) be the hostname that is needed for the ODBC connection to MySQL (as in user@host)?
na, unlikely. My IP shows up as 213.106.214.10/11/12 usually. This isn't my ip at all, it's the ip of one of the magical big caching machines that NTL use to speed up their net access. Yours will probably be the server you're accessing the net through.