SHARE
TWEET

check.php

jlalt Jun 1st, 2020 605 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. if(isset($_POST['romID']))
  4. {
  5.     $romID = $_POST['romID'];
  6.  
  7.     $romvar = '{"IMEI": "","deviceId": "227CA9D2","updateToken": "415FD779AF","vendor": "","ver": "1","version": [{"versionId": "'.$romID.'"}]}';
  8.  
  9.     $ch = curl_init();
  10.     curl_setopt($ch, CURLOPT_URL, "https://query.hicloud.com:443/sp_ard_common/v1/authorize.action");
  11.     curl_setopt($ch, CURLOPT_HEADER, 0);
  12.     curl_setopt($ch, CURLOPT_TIMEOUT, 20);
  13.     curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
  14.     curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
  15.     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  16.     curl_setopt($ch, CURLOPT_POST, 1);
  17.     curl_setopt($ch, CURLOPT_POSTFIELDS, $romvar);
  18.            
  19.     $resp = curl_exec($ch);
  20.     curl_close($ch);
  21.    
  22.     $where = strpos($resp, "&");
  23.     if($where === false)
  24.     {
  25.         echo 'e';
  26.     }
  27.     else   
  28.     {
  29.         $resp = base64_decode(substr($resp, 5, $where - 5));
  30.        
  31.         if(strpos($resp, "status\":\"0") !== false || strpos($resp, "versionNumber") !== false)
  32.         {
  33.             echo '1';
  34.         }
  35.         else
  36.         {
  37.             echo '0';
  38.         }
  39.     }
  40. }
  41. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top