![]() |
Help with gethostbyname
Here's a simple program that uses gethostbyname
Code:
#include<stdio.h>---------------------------------------------- ./a.out Enter the string :yahoo.com host officail name yahoo.com Adress list 8.65.120.8 Adress list 16.65.120.8 Adress list 24.65.120.8 Adress list 32.65.120.8 Adress list 40.65.120.8 -------------------------------------------------------------------- ./a.out Enter the string :www.yahoo.com host officail name any-fp.wa1.b.yahoo.com Aliases : www.yahoo.com Aliases : fp.wg1.b.yahoo.com Adress list 96.145.50.8 Adress list 104.145.50.8 ------------------------------------------------------------------------------- I just want to know why the result differ when i give yahoo.com and www.yahoo.com.Also every time I run it even though giving the same site as input i get a list of different IP address list.Why is so. thanx |
Re: Help with gethostbyname
Because Yahoo has multiple servers using different CName for many aliases and www is different alias,.
|
| All times are GMT +5.5. The time now is 11:12. |