58 $geoData =
new Data();
59 $geoData->lang =
'en';
61 if (self::isAvailableBaseCountry())
63 $geoData->countryCode = $this->decode(geoip_country_code_by_name($ip));
64 $geoData->countryName = $this->decode(geoip_country_name_by_name($ip));
67 if (self::isAvailableBaseCity())
69 $recordByName = $this->decode(geoip_record_by_name($ip));
71 if (isset($recordByName[
'country_code']) && isset($recordByName[
'region']))
73 $geoData->timezone = $this->decode(
74 geoip_time_zone_by_country_and_region(
75 $recordByName[
'country_code'],
76 $recordByName[
'region']
81 $geoData->countryCode = $recordByName[
'country_code'];
82 $geoData->countryName = $recordByName[
'country_name'];
83 $geoData->regionCode = $recordByName[
'region'];
84 $geoData->cityName = $recordByName[
'city'];
85 $geoData->zipCode = $recordByName[
'postal_code'];
86 $geoData->latitude = $recordByName[
'latitude'];
87 $geoData->longitude = $recordByName[
'longitude'];
90 if (self::isAvailableBaseOrganization())
92 $geoData->organizationName = $this->decode(geoip_org_by_name($ip));
95 if (self::isAvailableBaseIsp())
97 $geoData->ispName = $this->decode(geoip_isp_by_name($ip));
100 if (self::isAvailableBaseAsn())
102 $geoData->asn = $this->decode(geoip_asnum_by_name($ip));
105 $dataResult->setGeoData($geoData);
190 'TYPE' =>
'COLSPAN2',
195 'TYPE' =>
'CHECKBOX',
196 'CHECKED' => self::isAvailableBaseCountry(),
201 'TYPE' =>
'CHECKBOX',
202 'CHECKED' => self::isAvailableBaseCity(),
207 'TYPE' =>
'CHECKBOX',
208 'CHECKED' => self::isAvailableBaseOrganization(),
213 'TYPE' =>
'CHECKBOX',
214 'CHECKED' => self::isAvailableBaseIsp(),
219 'TYPE' =>
'CHECKBOX',
220 'CHECKED' => self::isAvailableBaseAsn(),
233 if (self::isAvailableBaseCountry())
235 $result->countryCode =
true;
236 $result->countryName =
true;
239 if (self::isAvailableBaseCity())
241 $result->timezone =
true;
242 $result->countryCode =
true;
243 $result->countryName =
true;
244 $result->regionCode =
true;
245 $result->cityName =
true;
246 $result->zipCode =
true;
247 $result->latitude =
true;
248 $result->longitude =
true;
251 if (self::isAvailableBaseOrganization())
253 $result->organizationName =
true;
256 if (self::isAvailableBaseIsp())
258 $result->ispName =
true;
261 if (self::isAvailableBaseAsn())