I will be taking URL from user. Now I need to verify whether address is live or not.
For example:
If user enters “google.com”, then I will pass “google.com” as argument to some function, and function will return me TRUE if URL is live, upload and running, otherwise FALSE.
Any in-built function or some help.
I’d suggest using get_headers($url) and checking to see if one of your responses contains “200 OK”. If so, then the site is alive and responded with a valid request. You can also check for other status codes if you want, such as redirects and whatnot.