Python 3 Script to Get IP Address and Hostname of Website URL Using Socket Library Full Project For Beginners

You are currently viewing Python 3 Script to Get IP Address and Hostname of Website URL Using Socket Library Full Project For Beginners

 

Welcome folks today in this post we will be getting ip address and hostname of website url in python using socket library. All the full source code of application is given below.

 

 

Get Started

 

 

In order to get started you need to create an app.py file and copy paste the following code

 

app.py

 

 

 

 

Now we can run this app.py python script using the below command

 

python app.py

 

 

 

 

As you can see we are providing the website url as www.freemediatools.com and then it has gave me the ip address and hostnmame of this website

 

Leave a Reply