Last active
August 12, 2022 14:21
-
-
Save timersys/b6dda85acb7ca19c67d24700977cf0f0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// geot_user_country | |
// Return object of current user country details | |
$country = geot_user_country(); | |
echo $country->name; | |
echo $country->isoCode; | |
//geot_country_code | |
// return current user country code | |
echo 'You country code is : ' . geot_country_code(); | |
//geot_country_name | |
// return current user country name | |
echo 'You country name is : ' . geot_country_name(); | |
//geot_country_by_ip | |
// Return country by given ip or current user if not ip is given | |
// $country->name $country->isoCode | |
$country = geot_country_by_ip("190.188.153.122"); | |
echo 'Your country is : '. $country->name; | |
//geot_state_by_ip | |
// Return state by given ip or current user if not ip is given | |
// $state->name $state->isoCode | |
$state = geot_state_by_ip("190.188.153.122"); | |
echo 'Your state is : '. $state->name; | |
//geot_city_name | |
// Return current user city name | |
echo 'Your city is: '. geot_city_name(); | |
//geot_zip | |
// Return current user zip code | |
echo 'Your zip is: '. geot_zip(); | |
//geot_time_zone | |
// Return current user time zone | |
echo 'Your time zone is: '. geot_time_zone(); | |
//geot_lat | |
// Return current user lat | |
echo 'Your latitude is: '. geot_lat(); | |
//geot_lng | |
// Return current user lng | |
echo 'Your longitude is: '. geot_lng(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment