> For the complete documentation index, see [llms.txt](https://support.morozovpimnev.ru/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.morozovpimnev.ru/geoip/rabota-s-dannymi.md).

# Работа с данными

{% code lineNumbers="true" fullWidth="true" %}

```php
// с драйвером по умочланию
$oGeoData = GeoIp_Controller::instance()->execute();
```

{% endcode %}

{% code lineNumbers="true" fullWidth="true" %}

```php
// по указанному IP
$oGeoData = GeoIp_Controller::instance()->execute('192.1.0.1');

// по координатам, работает только с yandex, google и 2gis
$oGeoData = GeoIp_Controller::instance()->execute('47.23135,39.72328');
```

{% endcode %}

{% code lineNumbers="true" fullWidth="true" %}

```php
// с определенным драйвером
$oGeoData = GeoIp_Controller::instance('maxmind')->execute();
```

{% endcode %}

{% code lineNumbers="true" fullWidth="true" %}

```php
$oGeoData = GeoIp_Controller::instance()->execute();

if($oGeoData)
{
	echo 'Ваша страна: ' . Core_Array::get($oGeoData, 'country', Core_Array::get($oGeoData, 'country_iso', '')) . '<br />';
	echo 'Ваша область: ' . Core_Array::get($oGeoData, 'region', '') . '<br />';
	echo 'Ваш город: ' . Core_Array::get($oGeoData, 'city', '');
}
```

{% endcode %}
