Is it possible for $_SERVER['HTTP_USER_AGENT'] to not be set?

前端 未结 5 1526
眼角桃花
眼角桃花 2020-12-17 08:47

I\'ve just been looking through a website\'s error_log and one of the error\'s that has been logged a few times is:

[21-Jun-2011 12:24:03] PHP Not

5条回答
  •  情书的邮戳
    2020-12-17 09:48

    Yes, it's possible, but it never happens for a regular request.

    All browsers do send a browser string in the request, so any request that arrives without one comes from some other program. Even all well-behaving bots send a browser string, so you don't have to be concerned about not showing up in search engines either.

提交回复
热议问题