برنامه ای نوشتم که آدرس یک سایت رو بگیره و آی پی سایت رو نمایش بده. خیلی ساده (البته گرافیکی* #پایتون )
#Code By Saeed Damghanian
#Software Engineer from Semnan
import os, socket
import tkinter as tk
from tkinter import font
def response(a):
b = socket.gethostbyname(a)
c = "\n \n \nProgrammer: Saeed Damghanian\nWebsPyschool.blog.ir\nWant to Join our Telegram Channel? >> t.me/ghoghnous_iran"
return b + c
def do(a):
label['text'] = response(a)
root = tk.Tk()
root.title('Get Website Ip')
canvas = tk.Canvas(root, height=500, width=600)
canvas.pack()
#background_image1 = tk.PhotoImage(file='bg.png')
#background_label =tk.Label(root, image=background_image1)
#background_label.place(relwidth=1, relheight=1)
frame = tk.Frame(root, bg='#C02F11', bd=5)
frame.place(relx=0.5, rely=0.1, relwidth=0.75, relheight=0.1, anchor='n')
entry = tk.Entry(frame, font=('Modern', 15))
entry.insert(0, 'Website URL')
entry.place(relwidth=0.65, relheight=1)
button = tk.Button(frame, text='Get IP', bd=0, bg='white', fg='#098f00', font=60, command=lambda:do(entry.get()))
button.place(relx=0.7, relheight=1, relwidth=0.3)
lower_frame = tk.Frame(root, bg='#0ed400', bd=10)
lower_frame.place(relx=0.5, rely=0.25, relwidth=0.75, relheight=0.6, anchor='n')
label = tk.Label(lower_frame, font=('Modern', 15), anchor='nw', bg='#323142', fg='white', justify='left', bd=4)
label.place(relwidth=1, relheight=1)
root.mainloop()