PHP is a scripting language that is widely used by web developers. PHP is mainly used to design dynamic and interactive web pages. While developing web pages it is possible to determine whether the internet connection is working fine or not. Generally if Google.com opens then that means that the internet connection is working fine as this page opens easily and seamlessly. This can be checked in PHP with the help of a custom code.