get if url has www php code example Example: php if url contains if(strpos($_SERVER['REQUEST_URI'], "string")) { ... }