Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3630438
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T00:16:12+00:00 2026-05-19T00:16:12+00:00

I am creating a website which is going to require up-to-date iPhone App prices,

  • 0

I am creating a website which is going to require up-to-date iPhone App prices, such as on appshopper, and thanks to gbc here on stackoverflow I was directed towards using the iTunes Search API. I am somewhat familiar with PHP though I don’t practice it that often and am not familiar with the use of JSON or how to extract values from it. I tried to use the tutorial here: http://webhole.net/2009/11/28/how-to-read-json-with-javascript/ to get it to work, though I had no luck, no data was pulled and I am not skilled enough to figure it out. I have also attempted numerous other tutorials, though the one above seemed to fit the closest to what I needed. This is going to be a necessary portion of the site, though it is not the key component of the site, so it doesn’t need to be very robust, it just needs to work. I would appreciate any help, suggestions, or links.

Here is the code that I tried to use, I’m not sure if this is incapable of doing what I want it to or if I made some small error that I’m not sure of because I just followed a tutorial and don’t know what I am doing.

<input type="text" id="query" /><button>search</button><br />
<div id="results">

</div>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
var url='http://ax.itunes.apple.com/WebObjects/MZStoreServices.woa/wa/wsLookup?id=';
var query;
 $('button').click(function(){
  query=$("#query").val();
  $.getJSON(url+query,function(json){
   $.each(json.results,function(i,app){
      $("#results").append('<p>'+app.trackName+'</p>');
   });
  });
 });
});
</script>

Thank you, I really appreciate any help that anyone can provide.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T00:16:12+00:00Added an answer on May 19, 2026 at 12:16 am

    This should get you started.

    /wsLookup.php (Server ‘proxy’ to Apple API)

    <?php
    // the id for the Yelp app
    $id = "284910350";
    if (isset($_GET["id"])) {
        // Get the id from the ajax call
        $id = $_GET["id"];
    }
    // add the id to the url
    $apiUrl = "http://ax.itunes.apple.com/WebObjects/MZStoreServices.woa/wa/wsLookup?id=".$id;
    
    // setup the cURL call
    $c = curl_init();
    curl_setopt($c, CURLOPT_URL, $apiUrl);
    curl_setopt($c, CURLOPT_HEADER, false);
    
    // make the call
    $content = curl_exec($c);
    curl_close($c);
    ?>
    

    /index.html (Client code that will access the Apple API through the ‘proxy’)

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            var url = 'http://www.bgsisson.com/wsLookup.php';
            $('button').click(function() {
                query = $("#query").val();
    
                $.getJSON(url, {id:query}, function(json) {
    
                    alert("price: " + json.results[0].price);
                    alert("description: " + json.results[0].description);
                    alert("artistName: " + json.results[0].artistName);
    
                    // use html console to inspect the rest of this object
                    console.log(json);
                });
            });
        });
    </script>
    <input type="text" id="query"/>
    <button>search</button>
    <br/>
    
    <div id="results"></div>
    

    I have this code hosted on http://www.bgsisson.com/test.html if you want to look at it. Here is the id for the Yelp app, 284910350.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am going to be creating a website which will require up-to-date prices on
I'm a desktop application developer. I'm creating a basic website from which to sell
I'm creating a mobile website that will include a page from which people can
I am creating a website which is located in /shop/ on my webserver. It
I am creating a website on ASP.Net in which a user logs on and
I am creating a website which is not completed yet. Somebody suggested me to
I have a classifieds website which I am creating a login system for... In
I'm creating a multi-tenancy web site which hosts pages for clients. The first segment
I am creating a website in CakePHP and I am kind of new on
I am creating a website that has 5 different sub-sites each with the same

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.