您好需要从Apple直接主机获取imei检查的源代码: https://selfsolve.apple.com/warrantyChecker.do?sn=IMEI
Imports System.Net
Public Class Form1 '获得价值 Private WithEvents webclient As New webclient 公共函数getresult(ByVal url As String)As String 返回新的System.Text.UTF8Encoding()。GetString(webclient.DownloadData(url)) 结束功能
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
结束班
我使用这个脚本但是当我从网页获取数据时(在文本框中看到源代码而不是数据示例(IMEI,MODEL,Carrier等...) 你可以帮我制作自己的软件或PHP脚本吗。
答案 0 :(得分:1)
你的问题不是一个问题。这更像是一项任务。
该URL返回您需要解析的JSONP对象。
你说你想要一个php脚本来向你展示如何解析JSON对象,所以这就是你需要做的:
<?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
?>
调用它:scriptname.php?sn = ENTER_SN_HERE