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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:47:01+00:00 2026-06-04T05:47:01+00:00

I have a Login class that will parse an xml sent from an iOS,

  • 0

I have a Login class that will parse an xml sent from an iOS, Android phone. I’m not very good at php and my question is, how do I make my php page wait for a post? or do I just use

$xml = $_POST['login.xml'];
  ....
  //parse
  ....
echo $responsexml;

he also suggested

$xml=readfile("php://input");

to read the xml string. I’m much confused about this post business. Any help will be greatly apreaciated!

  • 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-04T05:47:03+00:00Added an answer on June 4, 2026 at 5:47 am

    When XML string will be sent via HTTP POST request, e. g. in your case in “login.xml” parameter, so yes, you can get this content by this code:

    $xml = $_POST['login.xml'];
    // parsing here...
    

    If you do not know in which parameter data will be, you can iterate through array $_POST. But it is unusual. When you are developing an app, at first you should create API in PHP and then you have to give developers of iOS and Android apps some specification, in which format data should be transferred (or, worse, they will give you some specification of in which format they are sending data).

    By the way. I think the simplest solution for this would be to send a POST request with data parameters “login” and “password”, for example. PHP would than run some verification and return some session id. And for all requests of this type, it’s better to avoid XML, all data can go via HTTP requests. And then you don’t have to parse anything:

    $login = $_POST['login'];
    $password = $_POST['password'];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Login Class which has a function: isCorrect() that takes username and
I am building a multi-tier application that will have multiple smaller apps apart from
I have created a BasePage class that inherits from System.Web.Ui.Page. In that base class
I have a Jframe class that has a login and password fields. When loggin
Hi every one I have these classe @Entity @Table(name = login, uniqueConstraints={@UniqueConstraint(columnNames={username_fk})}) public class
Hi I want to create a WCF service that have login method, which is
Basically, I currently have login/ in urls.py redirect to the django.contrib.auth.views.login and that seems
I'm developing a site that will display confidential readonly information, with data fetched from
Let's say I have a simple Login servlet that checks the passed name and
I have got a problem where my class apparently is not being parsed correctly

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.