Added get_public_ip()

This commit is contained in:
billz 2021-07-07 23:24:49 +01:00
parent 225bff59b6
commit 84fcedc203
1 changed files with 10 additions and 0 deletions

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];
}