Design and implement using PHP a class that contains function:
function getGeoLocation($url)
The function receives as an input a valid URL to a web page, the function downloads the web page's content and analyzes it. Based on the analysis, the function returns the country code (ISO 3166-1-alpha-2 code, see: [login to view URL]) of what it thinks is the geographical location of the website.
The website's geographical location analysis must be based on the content of the web page, not e.g. the geographical location of the web server the site uses. The code must not rely on information given in the page (e.g. content language meta tag) but instead it must also analyse the content itself. For example, the code could analyse the language of the web page using ngram analyser such as [login to view URL] and then figure out the country based on the language.
With your bid, please describe how you are going to detect the geographical location of a web page.
Note: The code can also use a database. If so, you must provide the SQL code to create the needed table(s). The code *cannot* rely to any third party api's (e.g. Google Translation API).