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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:00:51+00:00 2026-06-15T03:00:51+00:00

I am creating this application, it communicates with a PHP script on my web-server.

  • 0

I am creating this application, it communicates with a PHP script on my web-server.

Last night it was working perfectly. But today two of the connections does not get response.

I’ve tried the NSURL link in my browser, it works fine. Also one of the connections work, but as i said two connections does not work?

- (void) getVitsTitelByID:(int)id {

NSString *url = [NSString stringWithFormat:@"http://webserver.com   /ivitserdk.php?function=gettitelbyid&id=%d", id];
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:url] cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:1.0];
connectionTitelByID = [[NSURLConnection alloc] initWithRequest:request delegate:self];
}

connectionDidReciveData:

if(connection == connectionTitelByID){
    responseTitel = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
}

connectionDidFinishLoading:

if(connection == connectionTitelByID){
    titelLabel.text = responseTitel;
}

I’ve tried and debugging it.

responseTitel seems to be (null).

Help would be apriceated 🙂

  • 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-15T03:00:52+00:00Added an answer on June 15, 2026 at 3:00 am

    didReceiveData may be called N (several) times. save the data to a mutably data buffer (queue it up) and in didFinish read it into a string

    mock code:

    - (void) getVitsTitelByID:(int)identifier {
        NSString *url = [NSString stringWithFormat:@"http://webserver.com/ivitserdk.php?function=gettitelbyid&id=%d", identifier];
        NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:url] cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:1.0];
        connectionTitelByID = [[NSURLConnection alloc] initWithRequest:request delegate:self];
    
        dataForConnectionTitelByID = [NSMutableData data];
        [connectionTitelByID start];
    }
    
    - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {
        if(!data.length) return;
    
        if(connection == connectionTitelByID)
            [dataForConnectionTitelByID appendData:data];
    }
    
    - (void)connectionDidFinishLoading:(NSURLConnection *)connection {
        if(connection == connectionTitelByID) {
            id str = [[NSString alloc] initWithData:dataForConnectionTitelByID encoding:NSUTF8StringEncoding];
            NSLog(@"%@",str);
            dataForConnectionTitelByID = nil;
            connectionTitelByID = nil;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to do this web application I am creating in the best possible
I'm following this example for creating a simple Web application using JAX-RS, MongoDB and
I'm working on creating a WCF web service that communicates via JSON. I got
I am creating server-client application for iPhone. I want to communicate between two application
I am creating a scientific application, that communicates with two devices (one via USB,
I'm creating a Swing application that connects to a web server, running some servlets
I'm creating an ASP.NET web application to schedule tasks on our server from a
I'm creating a client-server application which communicates via a custom socket protocol. I'd like
I am creating a windows application using VB.Net and this application will take a
I am creating an application with silverlight 3.0 . In This application I had

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.