ip address and host name

Used socket to get the ip address and host name. We kept the code inside try & except for exception handling.
import socket
        my_host = socket.gethostname() 
        my_ip = socket.gethostbyname(my_host) 
        print("Hostname :  ",my_host) 
        print("IP : ",my_ip) 
        print("Unable to get Hostname and IP address")
The output will change based on your hosting server.

PHP Script to display IP address.
All Built in Functions in Python bin() complex()


Post your comments , suggestion , error , requirements etc here

We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2020 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer