如何在手机游戏中使用javascript从Iphone读取UDID?
我想通过Mobile Safari获得iPhone UDID.我使用 .mobileconifg作为
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<dict>
<key>URL</key>
<string>http://192.168.12.45:8080/enroll/retrieve</string>
<key>DeviceAttributes</key>
<array>
<string>UDID</string>
<string>SERIAL</string>
<string>CHALLENGE</string>
<string>IMEI</string>
<string>ICCID</string>
<string>VERSION</string>
<string>PRODUCT</string>
<string>DEVICE_NAME</string>
<string>MAC_ADDRESS_EN0</string>
</array>
</dict>
<key>PayloadOrganization</key>
<string>Org</string>
<key>PayloadDisplayName</key>
<string>Profile Service</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>PayloadUUID</key>
<string>D6F1B2A3-0039-48B5-915B-8E2B35663816</string>
<key>PayloadIdentifier</key>
<string>Identifer</string>
<key>PayloadDescription</key>
<string>This temporary profile will be used to find and display your current device's UDID.</string>
<key>PayloadType</key>
<string>Profile Service</string>
</dict>
</plist>
Run Code Online (Sandbox Code Playgroud)
retrieve.php
<?php
$data = file_get_contents('php://input');
header('Location: http://192.168.12.45/enroll/info?'.$data, true, 301);
?>
Run Code Online (Sandbox Code Playgroud)
info是一个目录,而不是一个页面,我在这个目录中创建了index.php,我在$ _GET中获取了数据.
但我能从php获得.
但我想使用java servlet,我在servlet url上的mobileconfig文件中更改了url,但我无法在java中获取任何值.
检索Java代码
Enumeration headerNames = request.getHeaderNames();
while (headerNames.hasMoreElements()) { …Run Code Online (Sandbox Code Playgroud)