I'm doing some simple experiments using Python socket, where I've a HOSTNAME which resolves with two IP addresses but when I use, socket.gethostbyname('demo.sample.com')
I'm getting only one IP address. Why is it showing that way? Is there any other way I can get multiple IP addresses?
EDIT - 1
I got it guys, instead of gethostbyname('demo.sample.com')
I tried gethostbyname_ex('demo.sample.com')
It gives the result as I expected.
From the documentation it is visible that:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With