Re: Domain Name of curent user



"Carl" <_Nospam_@xxxxxxxxxxxx> wrote in message
news:kEljf.24915$dO2.20117@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Michael wrote:
>> "Malcolm Dew-Jones" <yf110@xxxxxxxxxxxxxxxxxxx> wrote in message
>> news:438d4452$1@xxxxxxxxxxxxxxxxxxxxxx
>>
>>>Michael (INERFAZE@xxxxxxx) wrote:
>>>
>>>: "Shane" <shane@xxxxxxxxxxxxxxxxxxxx> wrote in message
>>>: news:pan.2005.11.30.02.31.11.424715@xxxxxxxxxxxxxxxxxxxxxxx
>>>: > On Wed, 30 Nov 2005 01:38:05 +0000, Michael wrote:
>>>: >
>>>: >> "Carl" <_Nospam_@xxxxxxxxxxxx> wrote in message
>>>: >> news:7d7jf.20683$BZ5.9444@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>>>: >>> Michael wrote:
>>>: >>>> Does someone have a reliable routine to get the domain name of the
>>>: >>>> current user of a web page? Something like NSLookup. I have no
>>>: >>>> problem
>>>: >>>> getting their IP address, but I also want the domaine name.
>>>: >>>> Thanks,
>>>: >>>> -Michael
>>>: >>>
>>>: >>> how about:
>>>: >>> http://www.php.net/manual/en/function.gethostbyaddr.php
>>>: >>>
>>>: >>> Carl.
>>>: >>
>>>: >> It may be just me, but that is the first think I tried and it gave
>>>me an
>>>: >> IP
>>>: >> address not a domain name.
>>>: >> Maybe it's the... "or a string containing the unmodified ip_address
>>>on
>>>: >> failure"... that is getting me.
>>>: >> -Michael
>>>: >
>>>: > er you want to do a reverse dns lookup?
>>>: > Thats fraught with issues.
>>>: >
>>>: > --
>>>: > Hardware, n.: The parts of a computer system that can be kicked
>>>: >
>>>: > The best way to get the right answer on usenet is to post the wrong
>>>one.
>>>: >
>>>
>>>: I'm not sure what you mean, when I type "NSLookup 70.98.111.52"
>>>: at the command prompt I get back "Name: box52.bluehost.com"
>>>: It works instantally and it works every time (that I have tried.)
>>>: I want to get that same answer via PHP.
>>>
>>>Try some other ips.
>>>
>>>An ip does not need a name, (and can have many).
>>>
>>>Even if it has a name, it does not need reverse lookup data.
>>>
>>>Even when that data is available, the name you get from the reverse
>>>lookup
>>>is not necessarily the same name that anyone uses to access the host by
>>>name. Indeed if you then lookup the name (i.e. you name you just got
>>>from
>>>the reverse lookup) then you may find it does not even resolve to the
>>>same
>>>ip you originally looked up.
>>>
>>>As for the gethostbyaddr function, it appears to return the original
>>>(input) address if it can't find a better name to go with it.
>>>
>>
>>
>> I am happy with the answer I get from NSlookup. But I am not familar
>> with getting results from system().
>> Can I use the system command to return the NSLookup result?
>>
>>
>
> Are you actually running nslookup on the same physical machine that is
> serving the failing php code?
>
> I would suspect that somehow there is a configuration problem. Something
> strange that they would show different results since the results should
> actually be returned from the name server, not the function/program or
> machine? Are both machines using the same dns server? Do both have access
> to the internet?
>
> Carl.

I have used NSLookup on many machines and haven't had any problems. But to
answer your question, no, I am only running the gethost on the server where
my web page is.
-Michael


.



Relevant Pages

  • nslookup and reverse lookup failure of nameserver under 5.2-RELEASE
    ... successful reverse lookup of the DNS server's IP. ... $ nslookup www.freebsd.org ... *** Can't find server name for address 172.16.0.1: ... fails, ...
    (freebsd-questions)
  • UPDATE: nslookup on solaris 9 not working
    ... a caching only name server with solaris. ... have PTR records (reverse lookup) defined as it is a hardware device. ... for using a caching only name server under solaris in which there is no PTR ... installed the box and patched it with the latest patch cluster, but nslookup ...
    (SunManagers)
  • Re: DNS Errors - Please Advice
    ... It seems when we do Nslookup it is defaulting to our secondary DNS ... domain Default Server: b10-its-dns2.umc.ufl.edu ... This is nslookup doing a reverse lookup of the IP of the DNS server, ...
    (microsoft.public.windows.server.dns)
  • Re: Cant join domain of DC server
    ... > could run the netdiag commands you mentioned. ... > commands and ran nslookup, my server is registered as Server3 whereas ... Do you mean nslookup said "Can't find server name for address ... reverse lookup zone and PTR record. ...
    (microsoft.public.windows.server.dns)
  • Re: Cannot Resolve Names Outside Windows Domain
    ... As I posted previously, at your suggestion, I tried the nslookup command outside of the windows domain. ... The result show nslookup is trying to use the windows domain 192.168.1.2 even when that name server is unavailable. ... Presumably if nslookup resolved to the IPS name server, the laptop could resove names and would allow internet browsing? ... you wrote that you have an assigned DNS server that you can ping. ...
    (microsoft.public.windowsxp.network_web)