title: Validation : URL (Simple)
body: <p>Is there a simpler way of validating an URL? </p>
  
  <pre><code>$website = test_input($_POST["website"]);
  
  if (!preg_match("/\b(?:(?:https?|ftp):\/\/|www\.)[-a-z0-9+&amp;@#\/%?=~_|!:,.;]*[-a-z0-9+&amp;@#\/%=~_|]/i",$website))
  {
      $websiteErr = "Invalid URL"; 
  }
  </code></pre>