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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:49:47+00:00 2026-05-26T16:49:47+00:00

This question came as a result out of: Asynchronous POST to server . To

  • 0

This question came as a result out of: Asynchronous POST to server. To reach people with the correct knowledge (it has to do with the server instead of the objective-C code) I created a new question.

I’m trying to POST to a server from within objective-C. When debugging on the server however, I noticed that the $_POST variable remains empty. I think (really not sure) it has to do with one of these things:

  • a redirect that I am not aware of, which empties the $_POST variable
  • print of $_SERVER contains this: [REQUEST_METHOD] => GET ???

The original url I am using in my code is: http://eng.studev.groept.be/web2.0/a11_web02/testApp.php
Printing the $_SERVER variable results in this:

[HTTP_ACCEPT] => text/html, application/xhtml+xml, */* 
[HTTP_REFERER] => http://eng.studev.groept.be/web2.0/a11_web02/ 
[HTTP_ACCEPT_LANGUAGE] => nl-BE 
[HTTP_USER_AGENT] => Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0) 
[HTTP_UA_CPU] => AMD64 
[HTTP_ACCEPT_ENCODING] => gzip, deflate 
[HTTP_HOST] => eng.studev.groept.be 
[HTTP_CONNECTION] => Keep-Alive 
[PATH] => C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Dell\SysMgt\RAC4;C:\Program Files (x86)\Dell\SysMgt\oma\bin;C:\Program Files (x86)\Apache Software Foundation\Apache2.2\svn\bin;C:\Program Files (x86)\Apache Software Foundation\Apache2.2\php;C:\Program Files (x86)\Java\jre6\bin;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\ 
[SystemRoot] => C:\Windows 
[COMSPEC] => C:\Windows\system32\cmd.exe 
[PATHEXT] => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC 
[WINDIR] => C:\Windows 
[SERVER_SIGNATURE] => [SERVER_SOFTWARE] => Apache/2.2.17 (Win32) DAV/2 mod_ssl/2.2.17 OpenSSL/0.9.8o SVN/1.6.13 PHP/5.3.3 
[SERVER_NAME] => eng.studev.groept.be 
[SERVER_ADDR] => 193.190.255.36 [SERVER_PORT] => 80 
[REMOTE_ADDR] => 193.190.253.160 
[DOCUMENT_ROOT] => D:/webroot/eng 
[SERVER_ADMIN] => //censored
[SCRIPT_FILENAME] => D:/webroot/eng/web2.0/a11_web02/testApp.php 
[REMOTE_PORT] => 49187 
[GATEWAY_INTERFACE] => CGI/1.1 
[SERVER_PROTOCOL] => HTTP/1.1 
[REQUEST_METHOD] => GET 
[QUERY_STRING] => [REQUEST_URI] => /web2.0/a11_web02/testApp.php 
[SCRIPT_NAME] => /web2.0/a11_web02/testApp.php 
[PHP_SELF] => /web2.0/a11_web02/testApp.php 
[REQUEST_TIME] => 1320869183

Anyone getting wiser out of this?

Thanks in advance

Edit

Code to generate the POST request:

NSString *post = [[NSString alloc] initWithFormat:@"email=%@&password=%@", self.email.text, self.password.text];    
NSData *postEncoded = [post dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:NO];
NSString *postLength = [NSString stringWithFormat:@"%d", [postEncoded length]];

NSURL *url = [NSURL URLWithString:@"http://eng.studev.groept.be/web2.0/a11_web02/testApp.php"];

NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];
[request setURL:url];
[request setHTTPMethod:@"POST"];
[request setValue:postLength forHTTPHeaderField:@"Content-Length"];
[request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
[request setHTTPBody:postEncoded];

// asynchronous request
self.connection = [NSURLConnection connectionWithRequest:request delegate:self];
  • 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-26T16:49:47+00:00Added an answer on May 26, 2026 at 4:49 pm

    [REQUEST_METHOD] => GET

    You didn’t post anything.

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

Sidebar

Related Questions

This question came about as a result of some mixed-language programming. I had a
Just when I was about to post this question, I came up with an
This question came to my mind when I learned C++ with a background of
This question came today in the manipulatr mailing list. http://groups.google.com/group/manipulatr/browse_thread/thread/fbab76945f7cba3f I am rephrasing. Given
This question came about because the cells gem specifies template directories using File.join('app','cells'). That
let me tell you a bit about where this question came from. I have
Problem This question actually came up at work today. We are planning an experiment
I just came across this question about initializing local variables. Many of the answers
Today I came across this question: you have a code static int counter =
I came across this question on an interview questions thread. Here is the question:

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.