BlackMouse
BlackMouse

Reputation: 4552

Get simple variable from php file (NSURL)

I'm trying to get the version name from a php file for my iphone app.

//version.php
 <?php 
    echo '1.0'; 
 ?>

How can I get the "1.0" into a NSString?

Thanks

Upvotes: 0

Views: 105

Answers (1)

Chintan
Chintan

Reputation: 1204

you can try this :

<?php 

   echo json_encode(array('version' =>'1.0'));

?>

you retreive json string and (json)decode it, get the array. this link to halp you : http://mobileorchard.com/tutorial-json-over-http-on-the-iphone/

Upvotes: 1

Related Questions