<?php $url = 'http://mydomain.com/u/123-test'; $url = parse_url($url, PHP_URL_HOST); //$url is POST from input field $domain = array('mydomain.com', 'mydomain.net'); if (!in_array($url, $domain)) { echo 'invalid URL'; }else{ echo 'valid URL'; } ?>
You have javascript disabled. You will not be able to edit any code.