if(filter_var($url, FILTER_VALIDATE_URL) === false){
echo "Success";}
else{
echo "Failure";}
My problem here is that it always echoes "Failure" even if my URL is valid.I might not have understood what filter_var really does, so correct me if I'm wrong, but if it filters the URL ( i.e the URL is invalid ) it returns the filtered URL. If it does not filter it ( i.e the URL is valid ) it returns false.
Can anyone tell me what I'm doing wrong?. Any input is appreciated.
