MY IP IP INFO PING TEST TRACE CIDR IP2INT
   

API

Your app needs to query the public IP of the device it is running on ?



Feel free to use our api, which returns the IP address either as a string or json encoded. The api is free to use for low query usage. If you find the service of use, we would however appreciate if you could in return give myipdoc.com a link on your homepage.

Currently, we do not enforce query limits.
However depending on server load, this may change any time. To keep informed about api updates and changes, you should follow us on twitter or facebook.


To obtain the IP address as plain text, query

http://myipdoc.com/ip.php

which will return

23.20.192.147


To obtain the IP address json encoded, query

http://myipdoc.com/ip.php?cmd=json

which will return

{"ip":"23.20.192.147"}

Note
Our server infrastructure is not suited for large scale api calls. In order to keep this service free for all users, we would appreciate if you would restrain from invoking our api if your app is a large scale deployment (see also our terms). For such apps you should either set up your own dedicated server, or invoke one of the commercial providers.

Setting up your own server can be as simple as creating a file with

.php

extension on your webserver with enabled php interpreter and inserting

<?php echo $_SERVER["REMOTE_ADDR"]; ?>

The output will be identical to a query of our plain text api.

 

  Copyright © 2015 by myIPdoc.com                           contact · terms and privacy ยท api