title: gethostbyname xcode issues
body: <p>Hey guys, I'm new at this stuff, but I'm trying to use gethostname() to work using xcode and the ipad. I've tried a couple of things, but they all seem to freeze up. </p>
  
  <p>So when I just do:         </p>
  
  <pre><code>host = gethostbyname("website.com");
  </code></pre>
  
  <p>that works fine. I'd like to be able to change the website from within the program though. </p>
  
  <p>I've tried:   </p>
  
  <pre><code>const char *server = [Website_NSString UTF8String];                    
  host = gethostbyname(server);
  </code></pre>
  
  <p>&nbsp;</p>
  
  <pre><code>const char *server = [Website_NSString cStringUsingEncoding:NSASCIIStringEncoding];     
  host = gethostbyname(server);
  </code></pre>
  
  <p>&nbsp;</p>
  
  <pre><code>const char *server[256];        
  [Website_NSString getCString:server maxLength:256 encoding:NSASCIIStringEncoding];    
  host = gethostbyname(Website_NSString);
  </code></pre>
  
  <p>and</p>
  
  <pre><code>host = gethostbyname(Website_NSString);
  </code></pre>
  
  <p>They've either come up with a the warning: Passing argument 1 of 'gethostbyname' from incompatible pointer type, or no warning at all. Still everytime the app just freezes. Please help.</p>