您可以使用php和mysql创建自己的登录系统。
将ipa文件放入public_html
或htdocs
或www_root
之前的文件夹中或您用作网站根目录的任何文件。这样人们就无法链接到它。
然后用一些这样的代码:
$file = '/absolute/path/to/application.ipa';
if (file_exists($file)) {
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.basename($file));
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . filesize($file));
ob_clean();
flush();
readfile($file);
exit;
}
这将迫使下载。如果用户未登录到会话中,则可以提供错误消息或类似信息。
这将强制下载.ipa文件,但是我需要使用清单文件链接到.ipa文件,以便用户能够通过下载应用程序点击一个链接。 – 2012-01-06 18:23:38
哦,然后对清单文件做同样的事情。您可以将标题更改为清单标题。 :) – 2012-01-07 01:18:12