check if a string is url or not php
snippet in php

check if a string is url or not php

user9369

<?php
  if(filter_var($imagePath, FILTER_VALIDATE_URL) === FALSE){
      echo "Not valide URL";
  }else{
      echo "valide URL";
  }