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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:13:18+00:00 2026-05-25T20:13:18+00:00

I am new to PHP, and I am using it to POST data from

  • 0

I am new to PHP, and I am using it to POST data from an iPhone. I have written a basic code to get data from the iPhone, post it to the php script on my server, and then using PHP, send that data to another webserver. However, the webserver is returning a response in XML, and since I am a newbie to PHP, I need help with it.
My code to send data:

<?php
$ch = curl_init("http://api.online-convert.com/queue-insert");
$count = $_POST['count'];

$request["queue"] = file_get_contents($count);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
$response = curl_exec($ch);
curl_close ($ch);
echo $response;
?>

I know I need to parse the XML response, but I have no idea how to do that. The XML response would be something like this:

    <?xml version="1.0" encoding="utf-8"?>
<queue-answer>
  <status>
    <code>0</code>
    <message>Successfully inserted job into queue.</message>
  </status>
  <params>
    <downloadUrl>http://www.online-convert.com/result/07d6c1491bb5929acd71c531122d2906</downloadUrl>
    <hash>07d6c1491bb5929acd71c531122d2906</hash>
  </params>
</queue-answer>
  • 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-25T20:13:19+00:00Added an answer on May 25, 2026 at 8:13 pm

    You’re probably looking for SimpleXML or DOMDocument.

    SimpleXML

    To load data from a string into an object: simplexml_load_string().

    DOMDocument

    To create one from a string: DOMDocument->loadXML().

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

Sidebar

Related Questions

I am using following code to get data from the Server and if the
I have a PHP script where I create a new process using proc_open().It executes
I'm trying to feed data from SQL database to FLEX, using php script in
Using jquery, i fetch a data from php to div $.post(url.php?info=+$('#info').val() // rest of
I'm fairly new to PHP and have built a medium sized website using standard
I am using PDO with PHP to create a new database and then a
I have media_main.php that is obtaining data from a MySQL database. One of the
Simply said: How do I receive data from a PHP echo to display using
I am using a class to use HTTP POST & getting data from a
I have ExtJS post data from a combofield to CodeIgniter. CodeIgniter reads the posted

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.