doujuan2688 2019-03-14 14:02
浏览 631

获取登录用户的Windows域(对于网站)

I have to redirect users of my website according to the domain of his computer. If his position is domain "A" he is redirected to the website A. If his position is domain "B" he is redirected to the website B.

I searched everywhere, I do not find how to do it. I can not go through ActiveX for security reasons.

I tried to use the php function gethostbyaddr but it return only my ip when i connect to the site.

Someone have an idea ?

Thanks !

  • 写回答

1条回答 默认 最新

  • douyin8809 2019-03-14 14:19
    关注

    Don't confuse Windows domains with Internet (DNS) domains. A 'host' is an Internet domain (e.g. google.com).

    There are no web standards to access Microsoft's proprietary network domain names. You can access the User Agent to read some basic info about the browser and OS, but that doesn't include the Windows domain AFAIK.

    Unless you are looking to do some hacky old-school stuff (read Internet Explorer) then this is not something you will be able to do. I suggest considering other approaches, such as leveraging the User Agent and using a tool like Bowser.

    评论

报告相同问题?

悬赏问题

  • ¥15 mmocr的训练错误,结果全为0
  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀