fork download
  1. <?php
  2.  
  3. $link = "google.com";
  4. if (!preg_match('/\b(?:(?:https?|ftp):\/\/|(?:www\.)?)[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-z0-9+&@#\/%=~_|]/i',$link))
  5. {
  6. echo '<label style="color:#fff">Sorry, your link is not in a valid address format.</label><br>';
  7. $error = 1;
  8. }
  9. else echo "Good link!";
Success #stdin #stdout 0.02s 52432KB
stdin
Standard input is empty
stdout
Good link!