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 9051799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T13:00:00+00:00 2026-06-16T13:00:00+00:00

I am trying to get an xml feed from a url http://api.eve-central.com/api/marketstat?typeid=1230&regionlimit=10000002 but seem

  • 0

I am trying to get an xml feed from a url

http://api.eve-central.com/api/marketstat?typeid=1230&regionlimit=10000002

but seem to be failing miserably. I have tried

  • new SimpleXMLElement,

  • file_get_contents and

  • http_get

Yet none of these seem to echo a nice XML feed when I either echo or print_r. The end goal is to eventually parse this data but getting it into a variable would sure be a nice start.

I have attached my code below. This is contained within a loop and $typeID does in fact give the correct ID as seen above

$url = 'http://api.eve-central.com/api/marketstat?typeid='.$typeID.'&regionlimit=10000002';
echo $url."<br />";
$xml = new SimpleXMLElement($url);
print_r($xml);

I should state that the other strange thing I am seeing is that when I echo $url, i get

http://api.eve-central.com/api/marketstat?typeid=1230®ionlimit=10000002

the &reg is the registered trademark symbol. I am unsure if this is “feature” in my browser, or a “feature” in my code

  • 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-06-16T13:00:01+00:00Added an answer on June 16, 2026 at 1:00 pm

    Try the following:

    <?php
    $typeID = 1230;
    // set feed URL
    $url = 'http://api.eve-central.com/api/marketstat?typeid='.$typeID.'&regionlimit=10000002';
    echo $url."<br />";
    // read feed into SimpleXML object
    $sxml = simplexml_load_file($url);
    
    // then you can do
    var_dump($sxml);
    
    // And now you'll be able to call `$sxml->marketstat->type->buy->volume` as well as other properties.
    echo $sxml->marketstat->type->buy->volume;
    
    // And if you want to fetch multiple IDs:
    foreach($sxml->marketstat->type as $type){
        echo $type->buy->volume . "<br>";
    }
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to get an xml feed from a website, nothing really special. My
I'm trying to do a rss feed in cakephp. I get the xml in
I am trying to use jMonthCalendar to add some events from an XML feed
If I use https://mail.google.com/mail/feed/atom/ feed from gmail, I get ONLY unread emails - as
I'm trying to UrlFetch the RSS/Atom feed from my site's news page posts URL
I'm trying to build an app that shows the latest RSS feeds from http://news.yahoo.com/rss/
I have 3 tags called 'Url' in my XML feed that I am trying
Im trying to parse a Xml file from a URL, the xml is actually
I'm trying to retrieve some XML from the Gmail API. I have this so
I'm trying to parse some XML I've gotten from the Google Data Booksearch API

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.