I have used the date_default_timezone_set()
to check and set the server time.
In the same way is this possible to get the server country in php?
Thanks in advance..
I have used the date_default_timezone_set()
to check and set the server time.
In the same way is this possible to get the server country in php?
Thanks in advance..
You can use the host.info api, combined with $_SERVER['SERVER_NAME']
... easy.
This question is a dupe, though, and the duplicate question (auto-commented) contains some more alternative API's you can use