SyntaxFix
Write A Post
Hire A Developer
Questions
I don't think you're setting the header correctly, try this:
header('HTTP/1.0 401 Unauthorized');