Info Panel
Roll it!   ⇔
1 - Documantation
* Knowledge Base
  • Mvc
  • Application
  • Advanced
  • Operators
  • Api
* Origin Template
  • Customize
* Core Classes
* Classes

* all grey titles exists but not documented yet

IpToCountry

Type: function

Class: IpToCountry

Platform: 2v

Function: ipToCountry

Visibility: public static

Parameter: ipToCountry($ip,$fullInfo)

Description:
Get country code/name from basic ip. * correct 90% of the time.
Parameters:
(required) - string - $ip - The subject ip.
(optional) - bool|false - $fullInfo - If true will return an array of: country code of 2 and 3 letters + full country name + flag from images/flags directory, if false will return country code of 2 letters or "Unknown".
Return:
string|array - The output country.
Callable from (extended classes):
application: controller,view
advanced: controller,view
operators: controller,view
api: controller,view
example: 1
We want to know from where the user is from and we need the 2 letters country code, so we will put his ip.
How to call (example):
Code:
Possible outcome (example):
Output:
example: 2
We want to know from where the user is from and we need the full country name.
How to call (example):
Code:
Possible outcome (example):
Output:
Info Panel
Roll it!   ⇔