简体   繁体   English

通过php或javascript检索iPad / iPhone序列号

[英]Retrieving iPad/iPhone serial number via php or javascript

I am trying to retrieve an iPad/iPhone serial number via PHP or Javascript for the purposes of locking an internal website down to a set of serial numbers. 我试图通过PHP或Javascript检索iPad / iPhone序列号,以便将内部网站锁定为一组序列号。

The only thing I have seen that comes close is creating an application installing it via iTunes then that application sends the serial number to the browser which seems quite long winded. 我唯一看到的就是创建一个通过iTunes安装它的应用程序然后该应用程序将序列号发送到浏览器,这似乎很长。 Does anyone have any ideas or even another possible unique identifier that can be used on these devices. 有没有人有任何想法或甚至可以在这些设备上使用的另一个可能的唯一标识符。

There is no way to do this, even from an iOS application. 即使从iOS应用程序也无法做到这一点。 You will need to choose an alternate method of controlling access to your site. 您需要选择一种控制对您网站的访问权限的替代方法。

For your case you actually probably can get the UDID, by getting them to install a .mobileprofile first. 对于您的情况,您实际上可能通过首先安装.mobileprofile来获取UDID。 (This is something like what testflight or hockeyapp do to register new devices) (这就像testflight或hockeyapp注册新设备一样)

See: Getting a device UDID from .mobileconfig 请参阅: 从.mobileconfig获取设备UDID

In general though, your solution seems just wrong to me. 总的来说,你的解决方案对我来说似乎是错的。 Why not just go with some kind of standard password based authentication? 为什么不采用某种标准的基于密码的身份验证? Doing this, or implementing user-agent checking will not make it truly any more secure. 执行此操作或实施用户代理检查不会使其真正更安全。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM