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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:16:28+00:00 2026-06-17T21:16:28+00:00

i want to get xml data from remote domain (multiple xml files) i am

  • 0

i want to get xml data from remote domain (multiple xml files) i am trying to get my xml using php proxy code and returning the result to ajax callback function to be parsed.
my code is :

<html>
<head>

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script>
$.ajax({
    type: "POST",
    url: 'proxy.php',
    parameters : {country : 'england'},
    dataType: "xml",
    success: parseXml
 });

function parseXml(xml) {
    console.log(xml);
    $(xml).find("category").each(function() {
        var name = $(this).attr('name');
        var file_group = $(this).attr('file_group');
        $("#live").append('<ul class="contests"><li class="contest_name"><table class="title_table" border="0"><tr><td><input type="checkbox" class="checkbox"></td><td class="name"><h3>'+ name +'</h3></td><td class="contest_image"><a href="#"><img src="./include-images/standing.png"></img></a></td></tr></table></li></ul>');
        $(this).find("match").each(function() {
        var time = $(this).attr('time');
        var status = $(this).attr('status');
        var ht_score = $(this).find('ht').attr('score');
        var localteam = $(this).find('localteam').attr('name');
        var visitorteam = $(this).find('visitorteam').attr('name');
        var goals_localteam = $(this).find('localteam').attr('goals');
        var goals_visitorteam = $(this).find('visitorteam').attr('goals');
        $("#live").append('<ul class="contests"><li class="fixture"><table class="fixture_table" border="0"><tr><td><input type="checkbox" class="checkbox"></td><td class="status">'+ status +'</td><td class="localteam">'+ localteam +'</td><td class="goals_localteam">'+ goals_localteam +'</td><td class="space">-</td><td class="goals_visitorteam">'+ goals_visitorteam +'</td><td class="visitorteam">'+ visitorteam +'</td><td class="ht_score">'+ ht_score +'</td></tr></table></li></ul>');
    });
    });
}


</script>
</head>
<body>

<div id='live'></div>
</body>
</html>

and my php proxy is:

<?php
// Set your return content type
header('Content-type: application/xml');

// Website url to open

$daurl = 'http://www.example.com/getfeed/b4998d59890f4280827e3b126a628af0/soccernew/home';

// Get that website's content
$handle = fopen($daurl, "r");

// If there is something, read and return
if ($handle) {
    while (!feof($handle)) {
        $buffer = fgets($handle, 4096);
        echo $buffer;
    }
    fclose($handle);
}
?>

i get my data easily for one link but i want to make that link ($daurl) to change depending on ajax parameter. my problem is that i cant get any ajax parameter from php proxy page i tried GET, POST but it just does not work it always seems that $_POST and $_GET arrays are empty and do not hold my ajax parameters can anybody help me , please?

  • 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-17T21:16:29+00:00Added an answer on June 17, 2026 at 9:16 pm

    Use data : {country : 'england'} instead of parameters : {country : 'england'} like this:

    $.ajax({
        type: "POST",
        url: 'proxy.php',
        data: {country : 'england'},
        dataType: "xml",
        success: parseXml
     });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to get xml data from google server using it's API. so, i
I have one problem , I want to get some data from XML file
i get my pagedata from an xml and i want this data to be
What I want: get a xml from the AppData to use What I code
I am trying to select three values from xml document. I want to get
I want to pull in data using a XML::XPath parser from a XML DB
i want to get data from xml parser ? how can i get from
I want to get xml data from free.worldweatheronline.com I tried in flollowing way:- <fx:Script>
i want to get data from xml file and display it into html. Which
I want to get data from XML API output from Vimeo. In Vimeo if

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.