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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T00:55:41+00:00 2026-05-12T00:55:41+00:00

I’m sorry for opening a new question, I had to – as I wrote

  • 0

I’m sorry for opening a new question, I had to – as I wrote the other question from my iPhone as unregistered user and it is not very comfortable to write from the iPhone.

Rephrasing the question:

Is it possible to use the:

[NSMutableArray writeToURL:(NSString *)path atomically:(BOOL)AuxSomething];

In order to send a file (NSMutableArray) XML file to a url, and update the url to contain that file?

for example:
I have an array and I want to upload it to a specific URL and the next time the app launches I want to download that array.

NSMutableArray *arrayToWrite = [[NSMutableArray alloc] initWithObjects:@"One",@"Two",nil];

[arrayToWrite writeToURL:

[NSURL urlWithString:@"mywebsite.atwebpages.com/myArray.plist"] atomically:YES];

And at runtime:

NSMutableArray *arrayToRead =

[[NSMutableArray alloc] initWithContentsOfURL:[NSURL urlWithString:@"mywebsite.atwebpages.com/myArray.plist"]];

Meaning, I want to write an NSMutableArray to a URL, which is on a web hosting service
(e.g. batcave.net), the URL receives the information and updates server sided files accordingly.
A highscore like setup, user sends his scores, the server updates it’s files, other users download the highscores at runtime.

I hope this is clarified.

Edit: What I am looking for is scripting PHP or ASP so the website, the URL where the data is sent to would know how to handle it. I want an example or a tutorial on how to implement this scripting for handling data, if it’s possible to do this on a web hosting service.

~Thanks in advance.

  • 1 1 Answer
  • 1 View
  • 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-12T00:55:41+00:00Added an answer on May 12, 2026 at 12:55 am

    To answer the question “How do I create a high score like system?”, there are multiple parts of the system:

    • You need an ID for each user (a GUID generated on the iPhone, together with the users name should be sufficient).
    • You need a server that: remembers high scores; receives high scores from users; either displays (on a web site) the high scores and/or makes the high scores available for download to the phone.
    • You need some fraud protection, although that is likely fighting a losing battle against jailbreakers.

    On the iPhone app side, you might want to be able to download the current high scores for display, which is done easily enough with something like:

    int statusCode = 0;
    NSData* result = nil;
    NSHTTPURLResponse* response = nil;
    NSError* error = nil;
    NSString* url = @"http://www.yourserver.com/highscores.php"; // returns XML plist data
    NSMutableURLRequest* request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url] cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData timeoutInterval:180];
    result = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];
    //  NSLog( @"NSURLConnection result %d %@ %@", [response statusCode], [request description], [error description] );
    statusCode = [response statusCode];
    if ( (statusCode == 0) || (!result && statusCode == 200) ) {
        statusCode = 500;
    }
    

    Since it is synchronous, you might want to put it inside an NSOperation. Alternatively, you can use

    + (NSURLConnection *)connectionWithRequest:(NSURLRequest *)request delegate:(id)delegate
    

    To send high score data, because it is so small, the easiest way is simply to encode it in the URL.

    NSString* url = [NSString stringWithFormat:@"http://www.yourserver.com/sethighscores.php?uid=%@;name=%@;score=%d;antifraud=%@", [uid encodeParameter], [name encodeParameter], score, [secureHash encodeParameter]];
    

    Where encodeParameter is a custom category on NSString that encodes URL parameters and secureHash is a string representing a one way secure hashing of the uid, name, score and some secret known to your iPhone app and your web site. You’ll need to figure these out on your own or ask separate questions since this is already getting long.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but
I have a text area in my form which accepts all possible characters from
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am currently running into a problem where an element is coming back from

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.