I need a script like
if ($userLanguage === 'english') {
echo "we have detected you are English. would you like to visit our site in English?";
} else {
header('location: /index.php?lang=default');
}
The script above is used for an example. I have looked all over google and all it gave me was geolocation scripts and such. I don't want a third party URL in my script. You never know if their service goes down or not.
Where do I find something like this?