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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:42:48+00:00 2026-05-28T13:42:48+00:00

I am making an iPhone app which needs to send a couple of arrays

  • 0

I am making an iPhone app which needs to send a couple of arrays to a php script and then the php script needs to take the value(s) of those arrays and write an xml file. I know how to write the xml file with php, but I am unsure how to send the data to the php script from the iOS app…

Is it even possible to send a php script a couple of integer arguments from iOS? Sorry I am very new to php and iOS (programming in general for that matter).

Thanks

  • 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-28T13:42:48+00:00Added an answer on May 28, 2026 at 1:42 pm

    make GET or POST request from iOS app

    example:

    NSURL *url = [NSURL URLWithString:@"http://www.site.com/sendData.php"];
    
            NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:url 
                                                                      cachePolicy:NSURLRequestReloadIgnoringCacheData 
                                                                  timeoutInterval:60];
    
            [theRequest setHTTPMethod:@"POST"];     
            [theRequest setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
    
            NSString *postData = [NSString stringWithFormat:@"name1=%@&name2=%@", data1, data2];
    
            NSString *length = [NSString stringWithFormat:@"%d", [postData length]];    
            [theRequest setValue:length forHTTPHeaderField:@"Content-Length"];  
    
            [theRequest setHTTPBody:[postData dataUsingEncoding:NSASCIIStringEncoding]];
    
            NSURLConnection *sConnection = [NSURLConnection connectionWithRequest:theRequest delegate:self];    
            [sConnection start];
    

    In order to download the contents of a URL, an application needs to
    provide a delegate object that, at a minimum, implements the following
    delegate methods: connection:didReceiveResponse:,
    connection:didReceiveData:, connection:didFailWithError: and
    connectionDidFinishLoading:.

    about NSURLConnection
    about NSURLRequest

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

Sidebar

Related Questions

I'm making an iPhone app which needs to pull in random Linkedin profile pictures
I am making an application (iPhone app) which gets information (jokes) from an RSS
Hello I am new to iPhone development and I am making an app which
I am making an iphone app which requires me to make use of website
I am making an iPhone app in which on one of the UIWebView I
I am making an iPhone app. In this app I have a UITableView which
I am making an iPhone app which has ASCII art. I face a problem
I am making an iPhone app which has a requirement to implement the UIPageControl.
I am making an iPhone app which requires the current Stock Prices. I am
I'm making an iPhone App which involves balloons (UIImageViews) being spawned from the bottom

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.