【问题标题】:Block Connections From Other Devices阻止来自其他设备的连接
【发布时间】:2018-05-09 03:52:24
【问题描述】:

我有一个网站,我只想让移动设备进入该网站。所以我的问题是如何阻止来自其他设备的连接。

我可以在我的网站中使用 node.js html 和 php。

【问题讨论】:

    标签: php html node.js


    【解决方案1】:

    您可以在 PHP 中使用mobile detect 类,然后使用如下代码:

    // if visitor is not using any mobile device (phones or tablets).
    if ( !$detect->isMobile() ) {
        die("access denied")
    }
    

    【讨论】:

      猜你喜欢
      • 2014-12-02
      • 1970-01-01
      • 1970-01-01
      • 2021-05-23
      • 1970-01-01
      • 1970-01-01
      • 2014-04-13
      • 2019-12-21
      • 2019-09-12
      相关资源
      最近更新 更多