title: Validate URL - URL is Valid without TLD?
body: <p>So, I have an input box where someone can input a URL. When they submit the forum, I would like it to check if it is a valid URL.</p>
  
  <p>Now, my problem is that "<a href="http://someurl" rel="nofollow">http://someurl</a>" (without the TLD) is valid, and "someurl.com" or "www.someurl.com" is not valid (without the http://). Is there a way to fix this?</p>
  
  <pre><code>$input = 'someurl.com'; // Could also be an IP
  
  if (filter_var($input, FILTER_VALIDATE_IP)) {
      echo "IP Valid";
  } else if (filter_var($input, FILTER_VALIDATE_URL)) {
      echo "URL Valid";
  } else {
      echo "Not an IP or URL";
  }
  </code></pre>