Check if a URL is in a specified whitelist
Example whitelist: array( ‘mydomain.com’, ‘mydomain.net’ )
Parameters
Name | Type | Description |
---|---|---|
$url | string | URL to check for |
$whitelisted_domains | array | Array of whitelisted domains |
Return Value
bool: Returns true if $url is in the $whitelisted_domains