title: PHP url preg_match
body: <p>I have a problem with this preg_match</p>
  
  <pre><code>function isValidURL($url){
      return preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', $url);
  }
  if(!isValidURL($url)){
      echo 'false';
  } else 
      echo 'true';
  </code></pre>
  
  <p>For these links should display - true </p>
  
  <pre><code>/test.html
  /testowa-strona_9067.html
  /567890.html?get=test
  /costam.html?get=2&amp;f[]=k&amp;f[]=k2 
  </code></pre>
  
  <p>And for those false</p>
  
  <pre><code>/.html
  /ąęśćzmn-ż.html
  /testmhtml
  /%67%68%89(i&amp;.html?get=34 
  </code></pre>
  
  <p>But it always displays true</p>