<?php
$ip = gethostbyname('www.google.com');
echo "Resolution pour www.google.com: $ip";
echo "<br>";
$ip = gethostbyname('mysql1.web4all.fr');
echo "Resolution pour mysql1.web4all.fr: $ip";
?>
Resolution pour www.google.com: www.google.com
Resolution pour mysql1.web4all.fr: mysql1.web4all.fr
Resolution pour www.google.com: 173.194.40.148
Resolution pour mysql1.web4all.fr: 10.101.100.241
Resolution pour www.google.com: www.google.com
Resolution pour mysql1.web4all.fr: mysql1.web4all.fr
SQLSTATE[HY000] [2005] Unknown MySQL server host 'mysql1.web4all.fr' (2)
socket(PF_NETLINK, SOCK_RAW, 0) = 4
bind(4, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 0
getsockname(4, {sa_family=AF_NETLINK, pid=32629, groups=00000000}, [12]) = 0
sendto(4, "\24\0\0\0\26\0\1\3\315=\347R\0\0\0\0\0\0\0\0", 20, 0, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 20
recvmsg(4, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"0\0\0\0\24\0\2\0\315=\347Ru\177\0\0\2\10\200\376\1\0\0\0\10\0\1\0\177\0\0\1"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 288
recvmsg(4, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\24\0\0\0\3\0\2\0\315=\347Ru\177\0\0\0\0\0\0\1\0\0\0\10\0\1\0\177\0\0\1"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 20
close(4) = 0
open("/etc/hosts", O_RDONLY|O_CLOEXEC) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=175, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7650fa4000
read(4, "127.0.0.1 localhost localhost."..., 4096) = 175
read(4, "", 4096) = 0
close(4) = 0
munmap(0x7f7650fa4000, 4096) = 0
open("/etc/hosts", O_RDONLY|O_CLOEXEC) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=175, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa4404cc000
read(4, "127.0.0.1 localhost localhost."..., 4096) = 175
read(4, "", 4096) = 0
close(4) = 0
munmap(0x7fa4404cc000, 4096) = 0
socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 4
connect(4, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("127.0.0.1")}, 16) = 0
poll([{fd=4, events=POLLOUT}], 1, 0) = 1 ([{fd=4, revents=POLLOUT}])
sendto(4, "c<\1\0\0\1\0\0\0\0\0\0\6mysql1\7web4all\2fr\0\0"..., 35, MSG_NOSIGNAL, NULL, 0) = 35
poll([{fd=4, events=POLLIN|POLLOUT}], 1, 5000) = 1 ([{fd=4, revents=POLLOUT}])
sendto(4, "\234\367\1\0\0\1\0\0\0\0\0\0\6mysql1\7web4all\2fr\0\0"..., 35, MSG_NOSIGNAL, NULL, 0) = 35
poll([{fd=4, events=POLLIN}], 1, 4999) = 1 ([{fd=4, revents=POLLIN}])
open("/etc/host.conf", O_RDONLY) = -1 ENOENT (No such file or directory)
futex(0x7fbc91d213a4, FUTEX_WAKE_PRIVATE, 2147483647) = 0
open("/etc/resolv.conf", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=21, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbc94838000
read(3, "nameserver 127.0.0.1\n", 4096) = 21
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7fbc94838000, 4096) = 0
uname({sys="Linux", node="http1-apache-01a", ...}) = 0
open("/etc/hosts", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=175, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbc94838000
read(3, "127.0.0.1 localhost localhost."..., 4096) = 175
close(3) = 0