PHP FILTER_SANITIZE_URL Filter
Complete PHP Filter Reference Manual
Definition and Usage
The FILTER_SANITIZE_URL filter removes all illegal URL characters from a string.
This filter allows all letters, digits, and $-_.+!*'(),{}|^~[]`"><#%;/?:@&=
- Name: "url"
- ID-number: 518
Example
The output of the code is shown below:
string(24) "http://www.w3cschool.cc"
Complete PHP Filter Reference Manual