Created
December 20, 2016 07:23
-
-
Save 1Conan/520da7812ce24a1ed518bd4d3c52374d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $signedVersionsURL = "https://api.ipsw.me/v2.1/firmwares.json/condensed"; | |
| $ch = curl_init(); | |
| curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
| curl_setopt($ch, CURLOPT_URL,$signedVersionsURL); | |
| $result = curl_exec($ch); | |
| curl_close($ch); | |
| $data = json_decode($result, true); | |
| $firmwares = $data['devices'][$deviceInfo['deviceIdentifier']]['firmwares']; | |
| $countFirmwares = count($firmwares); | |
| for($i = 0; $i < $countFirmwares; $i++) { | |
| $current = $firmwares[$i]; | |
| if($current['signed'] == true) | |
| $firmware[] = $current; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment