I'm working on iOS UDID retrieval script and sadly been stuck in a tiny problem. As you may know, to retrieve iOS UDID, users must install a profile on iOS device. Afterward, device respond to the link which is defined into the profile. If user open the retrieval link directly, will get Error 405 Method not allowed. same as the following links: http://get.udid.io/retrieve/ and http://license.if0rce.com/connect/retrieve
The code in /retrieve/index.php is:
<?php
$data = file_get_contents('php://input');
file_put_contents("data.txt", $data);
?>
I may set a custom error by adding:
if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
header("HTTP/1.0 405 Method Not Allowed");
exit(); }
But it's not the professional way. I would like user get an error exactly the same as the mentioned links.
Any ideas?
Appreciate your help :)
information-retrieval
… (removed) – AliaaliasAllow
header containing a list of valid methods for the requested resource." – Sisera