how to check if the url is working or not using php code example
Example: check if a string is url or not php
<?php
if(filter_var($imagePath, FILTER_VALIDATE_URL) === FALSE){
echo "Not valide URL";
}else{
echo "valide URL";
}
<?php
if(filter_var($imagePath, FILTER_VALIDATE_URL) === FALSE){
echo "Not valide URL";
}else{
echo "valide URL";
}