<?php if ($_SERVER['HTTP_REFERER']; == "http://www.miurl.com/mipag.php" or "http://miurl.com/mipag.php") { echo "muy bien "; else { echo "mal mal"; } ?>