2017-11-25 109 views
-1

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

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

回答

0

您可以使用mobile detect类在PHP中,然后使用这样的代码:

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