I’m writing a script where I need to check if a url actually works. I tried something like
if(@file_get_contents($url))
url works
However, for some reason when url does not work it times out.
Is there a better and faster way to do this? I’m pretty new to php so please keep the words simple