I wanna get an iphone UDID in mobile safari,and I follow this Getting an iPhone UDID from Mobile Safari, however, I doubt whether we do interactions with apple's server(ex: send some data to apple's server or get some data from apple's server ) during the steps mentioned in above article.
- They click a link to a .mobileconfig XML file on your website
- This pulls up their provisioning settings on their phone & offers them an 'Install' button (which they must press)
- The phone sends the data you requested in encrypted XML to the URL you set in your .mobileconfig
- You process the resulting data & show them a "thank you" web page
Apple Server plays no role while you retrieve the UUID from the device by the above method mentioned in your question.
You can check this by creating a hotspot and connect both your phone and the server which serve the .mobileconfig file to the hotspot. install the provision file on your phone and it will send back the response to the URL mentioned in the .mobileconfig file.
tip: you have to install trust certificate before installing the .mobileconfig file.
The only useful reason I can think of for having someone's UDID outside of an app would be for a beta distribution service, in which case you're almost certainly better off using a platform such as Testflight/Apple Beta or Installr (personally, I find Installr far easier to use and provision devices than Apple/Testflight).
If that is what you're trying to do, definitely give Installr a shot - it can connect to your Apple account and automatically provision devices, I've used it to send several betas or private builds to non-technical people and its by far been the easiest set up process.
Otherwise, mikep is right, it's iffy territory and I think Apple would disapprove of it / users are highly unlikely to accept the mobileconfig file anyway
Installr
You can visit this site UDID
Here it will install a certificate and after installing it will show the UDID of the current device.