Contact
Privacy
Coding Development Art
      • Home
      • Latest
      • Oldest
      • Popular
      • Random
  • Home»
  • Categrories»
  • Programming Languages»
  • Python»

Write a python function to check external IP address - Python

Categories:
Python
Viewed: 3 - Published at: a few seconds ago

Write a python function to check external IP address

def check_ip():
    import re
    import urllib.request as ur
    url = "http://checkip.dyndns.org"
    with ur.urlopen(url) as u:
        s = str(u.read())
        ip = re.findall(r"\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}", s)
        print("IP Address: ", ip[0])
        return ip[0]

Related Posts:

How to Find Best Free Data Recovery Solution for Windows
How to Find Best Free Data Recovery Solution for Windows
Review
Android Upload Image to Server Using Volley
Android Upload Image to Server Using Volley
Android
Reading and Writing JSON to a File in Python
Reading and Writing JSON to a File in Python
Python
Android Navigation Drawer Tutorial
Android Navigation Drawer Tutorial
Android
The Future of App Development – Amazon AppStream
The Future of App Development – Amazon AppStream
Mobile
Android WebView Example
Android WebView Example
Android

You may also like:

What is Tail Recursion?
What is Tail Recursion?
Data Structure
Modify int result of count in sql server 2005
Modify int result of count in sql server 2005
Why should I avoid using CGI?
Why should I avoid using CGI?
How can I get the timezone adjusted hour for each row in a pandas DataFrame when working with multiple timezones?
How can I get the timezone adjusted hour for each row in a pandas DataFrame when working with multiple timezones?
Python
How to set the classpath of properties file in Weblogic Admin Console?
How to set the classpath of properties file in Weblogic Admin Console?
Java
Python sqlite3 string variable in execute
Python sqlite3 string variable in execute
Python
Categories
  • Blog
    • Career
    • Computer
    • Downloads
    • Internet
    • Linux
    • News
    • Review
    • Security
    • Technology
  • Database
    • MySql
    • Oracle Database
    • SQL Server
    • SQLite
    • mongodb
  • Dev
    • Algorithm
    • Android
    • Batch File Programming
    • Books
    • Competitive Programming
    • Computer Networks
    • Data Structure
    • Design
    • Development
    • Flutter
    • Game
    • Git
    • Interview Questions
    • JDBC
    • Machine Learning
    • Mobile
    • Operating System
    • Programming
    • Projects
    • Sponsored
    • Webservice
    • iOS
  • Framework
    • .NET
    • Angular
    • Django
    • MVC
    • Nodejs
    • React
  • Programming Languages
    • ASP.NET
    • C Programs
    • C#
    • C++ Programs
    • CSS
    • HTML
    • JSP
    • Java
    • JavaScript
    • PHP
    • PL/SQL
    • Python
    • SQL
    • Swift
    • VB.NET
  • Tools
    • privacy-policy-generator
    • Mac Vendors
    • Ports Numbers
    • Wifi Routers Passwords

Site all the data, are collected from Internet, belongs to original author, please do not used for commercial purposes !

Coding Development Art
  https://www.codevelop.art
 
  contact@codevelop.art

Posts

  • Home
  • Latest
  • Oldest
  • Popular
  • Random

Follow Us

© 2018 codevelop.art - Coding Develop Art - programming and development tutorials blog - Learn all Program languages | codevelop.art.
All Rights Reserved.
  • Contact
  • Privacy
  • Terms of service
  • Copyright
  • Disclaimer