Python Forum
How would I find the url name from a ip address
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How would I find the url name from a ip address
#1
What I would like to do is enter a ip address like 216.40.47.17 and get the name of the website.
I know I am going have to go through a dns server, I am not sure how to do that.
Maybe some one can help some.

Thank you
Renny
Reply
#2
import socket

url = "216.40.47.17"
print(socket.gethostbyaddr(url))
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020