I’m writing a script where I need to check if a url actually works. I tried something like
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