php - Check valid international URL -
i need check if international url valid. example:
http://täst.de/äxample-url/
how can that? can use composer package.
you can try test url using filter php.
example:
$url = "http://www.w3schools.com"; if (!filter_var($url, filter_validate_url) === false) { echo("$url valid url"); } else { echo("$url not valid url"); }
http://www.w3schools.com/php/filter_validate_url.asp http://php.net/manual/en/filter.filters.validate.php
Comments
Post a Comment