Why FILTER_VALIDATE_URL return FALSE for only this url?
Posted
by Axel
on Stack Overflow
See other posts from Stack Overflow
or by Axel
Published on 2010-04-07T23:07:51Z
Indexed on
2010/04/07
23:13 UTC
Read the original article
Hit count: 180
php
|filter-var
Hi, i have the following code:
<?php
$pictureurl="http://icons3.iconfinder.netdna-cdn.com/data/icons/pool/poolbird.png";
if(filter_var($pictureurl, FILTER_VALIDATE_URL) === FALSE){
echo "Invalid Url";
exit;
}else{
echo "Works!";
}
?>
This display "invalid url" for the above url, but not for other simpler urls. Is this a bug? you can even access the image.
And the most important is what's the solution for this?
Thanks
© Stack Overflow or respective owner