declare(strict_types=1);
require 'vendor/autoload.php';
use LukeHagar\Plex_API;
$sdk = Plex_API\PlexAPI::builder()->build();
$response = $sdk->plex->getGeoData(
);
if ($response->geoData !== null) {
// handle response
}
{
"code": "VI",
"continent_code": "NA",
"country": "United States Virgin Islands",
"city": "Amsterdam",
"european_union_member": true,
"time_zone": "America/St_Thomas",
"postal_code": 802,
"in_privacy_restricted_country": true,
"in_privacy_restricted_region": true,
"subdivisions": "Saint Thomas",
"coordinates": "18.3381, -64.8941"
}
Returns the geolocation and locale data of the caller
declare(strict_types=1);
require 'vendor/autoload.php';
use LukeHagar\Plex_API;
$sdk = Plex_API\PlexAPI::builder()->build();
$response = $sdk->plex->getGeoData(
);
if ($response->geoData !== null) {
// handle response
}
{
"code": "VI",
"continent_code": "NA",
"country": "United States Virgin Islands",
"city": "Amsterdam",
"european_union_member": true,
"time_zone": "America/St_Thomas",
"postal_code": 802,
"in_privacy_restricted_country": true,
"in_privacy_restricted_region": true,
"subdivisions": "Saint Thomas",
"coordinates": "18.3381, -64.8941"
}
Gets the geo location data of the user
Geo location data