Since you used forward slash /
as the delimiter, you must escape it inside the regex:
if (!preg_match("/%^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@|\d{1,3}(?:\.\d{1,3}){3}|(?:(?:[a-z\d\x{00a1}-\x{ffff}]+-?)*[a-z\d\x{00a1}-\x{ffff}]+)(?:\.(?:[a-z\d\x{00a1}-\x{ffff}]+-?)*[a-z\d\x{00a1}-\x{ffff}]+)*(?:\.[a-z\x{00a1}-\x{ffff}]{2,6}))(?::\d+)?(?:[^\s]*)?$%iu/",$website)) {
$websiteerror = "Invalid URL";
}
Now the code runs for me, but I still get this warning:
PHP Warning: preg_match(): Compilation failed: character value in \x{} or \o{} is too large at offset 106 in source_file.php on line 3
It seems PHP doesn't completely like the hex ranges you used in some of your character classes.