#include #include #include #include #include #include int main() { struct hostent *hp; if ((hp=gethostbyname("www.lemonde.fr") ) == NULL) { printf("Adresse non trouvee !"); exit(1); } printf("Nom: %s\n", hp->h_name); printf("Addresse IP : %s\n", inet_ntoa(*((struct in_addr *)hp->h_addr))); return 0; }