Definitely that works, but I'd like to know a little more. What's behind of this function? Who are what is being queried?
Receptional Andy
3:29 pm on May 24, 2006 (gmt 0)
I believe you would just be querying the default DNS server configured on the web server you call the script from.
fischermx
4:43 pm on May 24, 2006 (gmt 0)
I'm testing the function on my development pc and works fine, using plain C# console application. I wonder if this is the kind of call that would need an special permission from my hosting provider, or it is somehow unharmfull.
larryn
5:25 pm on May 24, 2006 (gmt 0)
fisher,
Typical analytics applications do a look up from the IP in the log file. Looking up IP's when serving pages is generally discouraged, as it can take many seconds for a reverse DNS probe, and then they are often unsuccessful.
Larry
fischermx
6:22 pm on May 24, 2006 (gmt 0)
Exactly, I've just noticed that. It takes a couple of seconds to resolve each. However, there are services like those from statcounter or ad free stats that immediatly show up the hostname, so definitely they're resolving the names on the fly. I'm not going to resolve hostname on page serving, but instead I'm sort of doing a track service like those. How do they do it?