/ Published in: Python
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
import socket s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.connect(('google.com', 0)) s.getsockname()[0]
URL: http://commandline.org.uk/python/how-to-find-out-ip-address-in-python/