Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onurl( $urllist = array(), $url = '' ) {
- $urllist = array_map( 'trim', $urllist );
- if(!empty($urllist)) {
- foreach( $urllist as $ul ) {
- if(preg_match( '#' . $ul . '#i', $url )) {
- return true;
- }
- }
- // if we are here then there hasn't been a match
- return false;
- } else {
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement