我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

阻止来自其他设备的连接

I have a website and I just want mobile devices to enter the site.So my question is how can I block connections from other devices.

I'm able to use node.js html and php in my website.

You can use mobile detect class in PHP and then use a code like this :

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

近期文章

  • PHP:PDO rowCount()有时返回0? [重复]
  • 根据值Laravel登录用户
  • 从php表单获取.csv格式的数据
  • Symfony类区分大小写错误
  • 在laravel中验证APIKEY Mailchimp
  • 在ajax响应上应用表类
  • Angular5与Symfony3授权
  • 如何在codeigniter中使用url路由
  • Wordpress自定义帖子类型类别
  • 从表中选择最后插入的数据
  • 在sql server中动态添加列[重复]
  • 使用Javascript修改表单值
  • Woo Commerce 3.0上的特色产品
  • Yii2 CSRF令牌时间段增加
  • Laravel - 基于关系的事件
  • codeigniter会话数据在ssl上丢失
  • simplexml中的条件内部回声
  • 剩下的时间计算不适用于PHP
  • 加载Codeigniter之外的视图
  • 通过Woocommerce Rest API列出订单

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华