How to use FILTER SANITIZE URL in PHP
This article describe about FILTER_SANITIZE_URL filter in PHP.
FILTER_SANITIZE_URL filter
For remove all illegal URL character from a string used FILTER_SANITIZE_URL.
It is all letters, digits and $-_.+!*'{}|^~[]`#%/[email protected]&=
- Name: "url"
- ID-number: 518
Example
<html>
<body>
<?php
$var="http://www.dotnetheåøaven.coøm";
var_dump(filter_var($var, FILTER_SANITIZE_URL));
?>
</body>
</html> |
Output

You may also want to read these related articles Click here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here