check if strong is url php code example
Example 1: php if url contains
if(strpos($_SERVER['REQUEST_URI'], "string")) {
...
}
Example 2: check if valid url php
filter_var($url, FILTER_VALIDATE_URL);
if(strpos($_SERVER['REQUEST_URI'], "string")) {
...
}
filter_var($url, FILTER_VALIDATE_URL);