Not really, you could send a 401 header but this is easy to circumvent. This is all off the top of my head, I suppose, you could use PHP Sessions in conjunction to test for whether to send a authenticate header I suppose. Overall, I would recommend not using basic HTTP authentication as it's not very secure anyway.