Hello,
how to check if http(s) URL is valid?
read the headers when they're returned. Either the link will time-out (as in no site is there) or a header will be returned.
Alternatively you can do a WHOIS search with ICANN and see if the domain has been registered at all.
Function get-headers() is only from PHP 5, what if i still use PHP 4?
You could try using a function from one of the user contributed notes on that same page.