ip() html()
An IP address with the flag and name of its country (GeoIP), linked to an IP lookup site.
html()->ip()Options
| Option | Meaning |
|---|---|
$ip | The address (or ['ip', 'class']). |
Example
Code
// the country comes from ext-geoip through yf_api, which calls it without a check
if ( ! function_exists('geoip_country_code_by_name')) {
return html()->alert('ip() needs the PHP geoip extension, which is not installed here.', ['alert' => 'info', 'no_close' => 1]);
}
return html()->ip('8.8.8.8');Notes
- The link goes to infobyip.com; the online users and log pages of the admin use it.
See also: html/country