PHP: Link Validation Func