php check if url exist 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);