mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-25 00:50:29 +00:00
Added get_public_ip()
This commit is contained in:
parent
225bff59b6
commit
84fcedc203
1 changed files with 10 additions and 0 deletions
|
@ -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];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue