title: iphone download image with variable using ASIHTTPRequest
body: <p>I got stuck something annoying. </p>
  
  <p>I uploaded images to server it's ok. 
  However, when i try to download image from server i want to get image with string variable. here is my php code server side</p>
  
  <pre><code>         ....
  
          echo "image_getting;";
          $fullPath = $_POST['download_image'];
          echo file_get_contents($fullPath);
  
           ....
  </code></pre>
  
  <p>if i remove first line from my server [request responseData] working correctly.
  However, i want to also get "image_getting;" because i am also downloading some different types.</p>
  
  <p>if i can clear, iphone side
  when i say </p>
  
  <pre><code>- (void)requestFinished:(ASIHTTPRequest *)request
  {
      NSString *responseString = [request responseString];
      NSLog(@"%@",responseString);
  
      NSArray *resultResponseArray = [responseString componentsSeparatedByString:@";"];
      if([[resultResponseArray objectAtIndex:0] isEqualToString:@"image_getting"])
      {
            NSData *responseData = [request responseData];
            UIImage * image = [UIImage imageWithData:aData];
            .......
      }
      else if...
  ....
  }
  </code></pre>
  
  <p>as you can see above response data also taking echo "image_getting" how do i split it.
  I tried to convert and split them it didn't work.</p>
  
  <p>I should say, i am very bad with php.</p>
  
  <p>I will be appreciated, if someone help me.
  Thanks</p>
  
  <p>EDIT:Solution Php side </p>
  
  <pre><code>    header('X-Return: image_getting;');
      $fullPath = $_POST['download_image'];
      echo file_get_contents($fullPath);
  </code></pre>
  
  <p>iphone side</p>
  
  <pre><code>    NSLog(@"header %@",[[request responseHeaders] objectForKey:@"X-Return"]);
  </code></pre>