MY IP ADDRESS
IPv4 & IPv6 Discovery & Geolocation
Your IPv4 Address
Your IPv6 Address
Developer API
| Type | Format | Endpoint URL Example | Response Preview |
|---|---|---|---|
| Default IPv4 & IPv6 |
Plain Text | https://api.ridho.id |
123.45.67.89 |
| JSON | https://api.ridho.id/?format=json |
{ "ip": "123.45.67.89" } |
|
| JSONP | https://api.ridho.id/?format=jsonp&callback=fn |
fn({ "ip": "123.45..." }); |
|
| Full (Text) | https://api.ridho.id/?format=full |
IP: 123.45... Country: ID... |
|
| Full JSON | https://api.ridho.id/?format=full-json |
{ "ip": "...", "country": "ID" } |
|
| IPv4 Only | Plain Text | https://api4.ridho.id |
123.45.67.89 |
| JSON | https://api4.ridho.id/?format=json |
{ "ip": "123.45.67.89" } |
|
| JSONP | https://api4.ridho.id/?format=jsonp&callback=fn |
fn({ "ip": "123.45..." }); |
|
| Full (Text) | https://api4.ridho.id/?format=full |
IP: 123.45... Country: ID... |
|
| Full JSON | https://api4.ridho.id/?format=full-json |
{ "ip": "...", "country": "ID" } |
|
| IPv6 Only | Plain Text | https://api6.ridho.id |
2001:db8::1 |
| JSON | https://api6.ridho.id/?format=json |
{ "ip": "2001:db8::1" } |
|
| JSONP | https://api6.ridho.id/?format=jsonp&callback=fn |
fn({ "ip": "2001..." }); |
|
| Full (Text) | https://api6.ridho.id/?format=full |
IP: 2001... Country: ID... |
|
| Full JSON | https://api6.ridho.id/?format=full-json |
{ "ip": "...", "country": "ID" } |
Integration Example (PHP)
<?php
// Get JSON response
$response = file_get_contents("https://api.ridho.id/?format=json");
$data = json_decode($response, true);
echo "My IP is: " . $data['ip'];
?>