20 lines
366 B
PHP
20 lines
366 B
PHP
<?php
|
|
|
|
use App\Modules\IpStack\Repositories\IpStackRepository;
|
|
|
|
/**
|
|
* Check if a client IP is in our Server subnet
|
|
*/
|
|
function isLocalIp(string $ip = ''): bool
|
|
{
|
|
return IpStackRepository::isLocalIp($ip);
|
|
}
|
|
|
|
/**
|
|
* Get country code from ip
|
|
*/
|
|
function getCountryCodeFromIp(?string $ip = ''): string
|
|
{
|
|
return IpStackRepository::getCountryCodeFromIp($ip);
|
|
}
|