Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
MP_Searches::_getClientAddressbyReader( array $data )
Get Clent Address through Reader.
Contents
Parameters Parameters
- $data
-
(array) (Required) data
Return Return
(array) UTM.
- ''client_info''
(array) Client address.- ''ip''
(string) ip - ''city''
(string) city - ''country''
(string) country - ''zipcode''
(string) zipcode
- ''ip''
Source Source
File: mortgage-platform/Inc/MP_Searches.php
private function _getClientAddressbyReader( $data ) {
$data['client_info'] = array();
$SxGeo = new Reader( plugin_dir_path( __FILE__ ) . '../vendor/kipkaev55/sxgeo/SxGeoCity.dat' );
if ( $_SERVER ) {
$ip = getenv( 'REMOTE_ADDR' );
$data['client_info']['ip'] = $ip;
$data['client_info']['city'] = $SxGeo->getGeo( $ip )['city']['en'];
$data['client_info']['country'] = $SxGeo->getGeo( $ip )['country']['en'];
$data['client_info']['zipcode'] = '';
};
$data = $this->_getClientBrowser( $data );
return $data;
}
Changelog Changelog
| Version | Description |
|---|---|
| 1.0.0 | Introduced. |