1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00

Added get_public_ip()

This commit is contained in:
billz 2021-07-07 23:24:49 +01:00
parent 225bff59b6
commit 84fcedc203

View File

@ -778,3 +778,13 @@ class validation
}
}
/* Resolves public IP address
*
* @return string $public_ip
*/
function get_public_ip()
{
exec('wget https://ipinfo.io/ip -qO -', $public_ip);
return $public_ip[0];
}