0

hi there i need a source code for imei check from apple direct host : https://selfsolve.apple.com/warrantyChecker.do?sn=IMEI

Imports System.Net

Public Class Form1 'get the value Private WithEvents webclient As New webclient Public Function getresult(ByVal url As String) As String Return New System.Text.UTF8Encoding().GetString(webclient.DownloadData(url)) End Function

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    TextBox2.Text = getresult("https://selfsolve.apple.com/warrantyChecker.do?sn=" + TextBox1.Text)
End Sub

End Class

i use this script but when i get data raw from webpage ( in textbox see source code not data example ( IMEI , MODEL , Carrier etc ... ) can u help me to make my own software or php script please.

Sam
  • 7,252
  • 16
  • 46
  • 65
user1474375
  • 1
  • 1
  • 1

1 Answers1

1

Your question is not really a question. It's more of an assignment.

That URL gives back a JSONP object which you need to parse.

You say you want a php script to show you how to parse the JSON object, so here is what you need to do that:

<?php
$sn = $_GET['sn'];
//load the input (the serial number), you should then perform input filtering on the SN by filtering out non required characters

$o = file_get_contents("https://selfsolve.apple.com/warrantyChecker.do?sn=".$sn);
//fetch the URL's response body into a variable

$o = json_decode($o, true);
//decode the json object into an array

print_r($o);
//recursively print the array to show you what's inside the array
?>

to call it: scriptname.php?sn=ENTER_SN_HERE

Richard EB
  • 967
  • 10
  • 24