简体   繁体   English

如何使iPhone Web应用程序仅适用于某些iPhone

[英]How to make an iPhone web app only available to certain iPhones

im making an iPhone web app but only certain people need access to it. 我正在制作一个iPhone网络应用程序,但只有某些人需要访问它。 whats the best way to make it secure without having to get people to login every time they open it. 什么是使它安全的最佳方法,而不必每次打开时都让人们登录。

could i do something like http://www.domain.com/iphone/index.php?a=1234&b=5678 but make longer strings to make it more secure then on the index.php page get it to check that they all equal the right string? 我可以做一些类似http://www.domain.com/iphone/index.php?a=1234&b=5678事情,但可以使字符串更长以使其更安全,然后在index.php页面上获取它来检查它们是否相等正确的字符串?

like: if($_GET["a"] == '1234' and $_GET["b"] == '5678' { echo 'blah' } ...etc etc. 例如: if($_GET["a"] == '1234' and $_GET["b"] == '5678' { echo 'blah' } ...等等

or is there a way to check serial numbers or MAC addresses of the iPhone? 或者有没有办法检查iPhone的序列号或MAC地址?

You could do a ip whitelist? 你可以做一个ip白名单吗? Or make them login once, and save a persistent cookie with a session id. 或者让他们登录一次,然后保存带有会话ID的永久性cookie。

The only way to make a web app available on certain iPhones is to distribute it as ad-hoc . 使Web应用程序在某些iPhone上可用的唯一方法是ad-hoc分发它。 You could use Phonegap which is just html/css/js. 您可以使用只是html / css / js的Phonegap。

-> http://phonegap.com/ -> http://phonegap.com/

You can use client side ssl certificates to authenticate the device on your web server. 您可以使用客户端ssl证书来验证Web服务器上的设备。 testflight is doing that, for example. 例如,testflight正在这样做。

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

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