this should only alow http:// with domain name
with no folder extentions
Code: Select all
if(!preg_match("/^http://[0-9a-zA-Z-.].[a-zA-Z]{2,3}$/", $_POST[linkto]))Code: Select all
if(!preg_match("/^http://(www.[0-9a-zA-Z][0-9a-zA-Z-][0-9a-zA-Z]|[0-9a-zA-Z][0-9a-zA-Z-][0-9a-zA-Z]).[a-zA-Z]{2,3}[0-9a-zA-Z/-_.]$/", $_POST[linkfrom]))