Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>since I'm still not absolutely clear on your use of the PHP (whether that's just how you're referring to your page generally, or if you'll be manipulating the json with the php directly), this may or may not be helpful:</p> <p>Page (maybe it was generated with php?):</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script type="text/javascript"&gt; function search() { var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200) { var resp = JSON.parse(xmlhttp.responseText); document.getElementById("result").innerHTML=""; for(var i=0;i&lt;resp.results.length;i++){ document.getElementById("result").innerHTML+=resp.results[i].trackName+'&lt;br/&gt;'; } } } xmlhttp.open("GET","it_search.php?artist="+document.getElementById('search').value,true); xmlhttp.send(); } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="myDiv"&gt;&lt;input type="text" id="search"/&gt;&lt;br/&gt; &lt;button type="button" onClick="search()"&gt;search&lt;/button&gt;&lt;/div&gt; &lt;div id="result"&gt;&lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>PHP Scraper:</p> <pre><code>&lt;?php header("content-type: application/x-javascript"); $var=urlencode($_REQUEST["artist"]); $file=file_get_contents("http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStoreServices.woa/wa/wsSearch?term=".$var."&amp;limit=20"); echo $file; ?&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload