I need to check if an international URL is valid. For example:
http://täst.de/äxample-url/
How can I do that? I can use any Composer package.
I need to check if an international URL is valid. For example:
http://täst.de/äxample-url/
How can I do that? I can use any Composer package.
You can try to test the url using a filter from PHP.
Example:
$url = "http://www.w3schools.com";
if (!filter_var($url, FILTER_VALIDATE_URL) === false) {
echo("$url is a valid URL");
} else {
echo("$url is not a valid URL");
}
http://www.w3schools.com/php/filter_validate_url.asp http://php.net/manual/en/filter.filters.validate.php