LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   why fsockopen() use root dns info?? - about php (https://www.linuxquestions.org/questions/linux-software-2/why-fsockopen-use-root-dns-info-about-php-169872/)

chtla 04-13-2004 11:42 PM

why fsockopen() use root dns info?? - about php
 
I have poor english.. sorry..

my office is using private ip(192.168.x.x) and setting dns server.
i hope use web mail at office, i am programming..
----------------------------------------------------
$fp = fsockopen("off.com", 110, $errno, $errstr, 30);
if(!$fp){
echo "$errstr ($errno)";
else{
echo "result : ".$fp;
}

result : connection refused (61)
-----------------------------------------------------
i checked system.
and found problem..
problem is that fsockopen() used root dns info.(connect real domain, off.com)
not used office dns info.

office dns server------------
off.com - 192.168.123.107
---------------------------------
----------------------------------------------------------------------
dns server checking..(freebsd)

# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK <759a094ace3177203a8c63d9aca14700@bsd.off.com>

# telnet off.com 110
Trying 192.168.123.107...
Connected to off.com.
Escape character is '^]'.
+OK <042ee5976a121afae2c0f93f9da2c869@bsd.off.com>

client computer checking..(win xp)

C:\>ping off.com
Pinging off.com [192.168.123.107] with 32 bytes of data:

Reply from 192.168.123.107: bytes=32 time<10ms TTL=64
Reply from 192.168.123.107: bytes=32 time<10ms TTL=64
Reply from 192.168.123.107: bytes=32 time<10ms TTL=64
Reply from 192.168.123.107: bytes=32 time<10ms TTL=64

Ping statistics for 192.168.123.107:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\>telnet off.com 110
+OK <3caf8d16b7dd05cbcb8bd120a7dde09b@bsd.off.com>
-------------------------------------------------------------------------

i think no problem at office dns server setting
fsockopen why use root dns server information ??

Any help will be appreciated.
Thanks

p.s) office ip is dynamic ip and can't setting domain..


All times are GMT -5. The time now is 08:36 PM.