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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:21:14+00:00 2026-05-27T01:21:14+00:00

I am making a POST request from IE using XDomainRequest . XDomainRequest does not

  • 0

I am making a POST request from IE using XDomainRequest. XDomainRequest does not sent a Content-Type in his header and it is not possible to set a custom header. I think this causes PHP to not place the post variables in $_POST.

I can see the parameters are send if I use file_get_contents("php://input") but I am not sure how to parse them correctly without breaking them. Is there a way to force PHP to collect the POST parameters? Or how can I get the variables safely?

I am using this transport to get XDomainRequest in jQuery and make this call:

jQuery.post('http://domain.de/io/login', 'email=test2@stuff.de&password=xxx', function(response)
{
    if (console) console.log(response);
    alert('response: ' + objectToString(response));
});

On the PHP side I have:

print_r($_REQUEST, true);
echo file_get_contents("php://input");

Works fine with Firefox. But Firefox does not use the transport.

  • 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-27T01:21:15+00:00Added an answer on May 27, 2026 at 1:21 am

    @hakre: Thanks a lot. Your document describes what no one here belives:

    The body of the request is to be interpreted according to the
    Content-Type header.

    It also mentions parse_str() that does exactly what I needed.

    Here my code to fill $_POST if it was not set by PHP:

    if (count($_POST) == 0)
    {
        $request_body = file_get_contents("php://input");
        parse_str($request_body, $_POST);
    }
    

    I would love to give you reputation for this but I don’t know how. Anyway you just got +50 from me, so I hope that will be ok.

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

Sidebar

Related Questions

I'm having troubles debugging a POST request I'm making from my web server to
I am making request calls using $.ajax, with post. The problem is, the post
Okay, so I am basically making a script to pass post data using cURL.
I'm making a post request to the server and getting back the array of
I can't seem to authenticate by making a POST request via ajax! I always
Is there a way to get the Content-Type of the response or conversely set
I'm using the following script to initiate file downloads: if (file_exists($newfilename)) { header('Content-Description: File
I am using prototype.js for making Ajax request. Everything was working fine till I
I'm making a post httpwebrequst, but in the HttpWebResponse im getting an error code
I am making a POST to a webservice that is local to the webserver.

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.