title: Best way to check if a URL is valid
body: <p>I want to use PHP to check, if string stored in <code>$myoutput</code> variable contains a valid link syntax or is it just a normal text. The function or solution, that I'm looking for, should recognize all links formats including the ones with GET parameters.</p>
  
  <p>A solution, suggested on many sites, to actually query string (using CURL or <code>file_get_contents()</code> function) is not possible in my case and I would like to avoid it.</p>
  
  <p>I thought about regular expressions or another solution.</p>