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

  • Home
  • SEARCH
  • 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 534973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:40:04+00:00 2026-05-13T09:40:04+00:00

I have been extracting information from the iTunes App Store for the past couple

  • 0

I have been extracting information from the iTunes App Store for the past couple of weeks using a script I found and modified. Everything was working fine until a couple days ago when I realized that no XML was being generated anymore. Here is the code for the script that generates the XML:

<?php
header("Content-type: text/plain"); 
ini_set('display_errors', false);

if(isset($_GET['appID']))
{
 $appID = (int)stripslashes($_GET['appID']);

 $url = "http://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=" . $appID . "&mt=8";

 $useragent = "iTunes/9.0.2 (Macintosh; Intel Mac OS X 10.5.8) AppleWebKit/531.21.8";
 $header = array("X-Apple-Store-Front: 143441-1");

 $ch = curl_init();
 curl_setopt($ch, CURLOPT_URL, $url);
 curl_setopt($ch, CURLOPT_FAILONERROR, 1);
 curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
 curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
 curl_setopt($ch, CURLOPT_USERAGENT, $useragent);

 $result = curl_exec($ch);

 curl_close($ch); 

 echo $result;
}
?>

So I added the HTTPHEADER option to no avail, but the kicker is that it works perfectly well when I go to Terminal and type this:

curl -s -A "iTunes/9.0.2 (Macintosh; Intel Mac OS X 10.5.8) AppleWebKit/531.21.8" -H "X-Apple-Store-Front: 143441-1" 'http://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=339038562&mt=8'

It returns the XML that I need, but why won’t the PHP script work?

Appreciate any help!

  • 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-13T09:40:05+00:00Added an answer on May 13, 2026 at 9:40 am

    Works fine for me. Here are few things to think about:

    • Are you sure $GET['appID'] is set? Perhaps the script is being run via a POST?
    • Comment out ini_set('display_errors', false); and see if any notices/warnings/errors appear.
    • Is the script running on the same box as the curl command line?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am extracting information about certain companies from Reuters using Python. I have been
I have been successful with extracting text from a PDF file using GhostScript along
I have been using the XML package successfully for extracting HTML tables but want
I've been having quite a difficult time extracting ID3 information from an MP3 being
I have been working on information extraction and was able to run standAloneAnnie.java http://gate.ac.uk/wiki/code-repository/src/sheffield/examples/StandAloneAnnie.java
Have been working on this question for a couple hours and have come close
Have been looking on some tutorials for drawing canvas using SurfaceView, but the only
I have been tracking emails for years using a "beacon" image and for those
I have been using TortoiseSVN for some time and I really like it. I
I have an app that is available from the Android Market. Some users have

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.