-1

A particular page is getting hit by someone using a block of IPs. Interestingly their headers are showing no information on their operating system or browser. How would I go about redirecting users that do not have browser or OS information in their http headers?

Is there an easy way to do this with some php?

4

1 回答 1

1

我同意 Colin Morelli 的评论:

馊主意。许多人有隐藏User-Agent标题的浏览器扩展,因为他们担心隐私。

但是,如果您想这样做,这很容易:

if (!isset($_SERVER['HTTP_USER_AGENT']) {
    // Redirect here.
    header('Location: http://example.com');
    exit;
}
于 2013-02-19T21:14:34.100 回答