showing results for - "apiipify"
Camila
10 Nov 2016
1# This example requires the requests library be installed.  You can learn more
2# about the Requests library here: http://docs.python-requests.org/en/latest/
3from requests import get
4
5ip = get('https://api.ipify.org').text
6print('My public IP address is: {}'.format(ip))
Marco
25 May 2017
1var http = require('http');
2
3http.get({'host': 'api.ipify.org', 'port': 80, 'path': '/'}, function(resp) {
4  resp.on('data', function(ip) {
5    console.log("My public IP address is: " + ip);
6  });
7});