i have a php page that connects to a database and retrieves data from a table given a GET parameter, suppose one would retrieve a list of shirts given a color:
select * from shirts where color = $_GET[color ;
I want form the iphone to make a request to that page, (sending that get parameter) and retrieve that data for using it in my app.
How would i do that?
Thanks!
Retrieving data from an URL can be done by using
NSURLConnection. You provide this class aNSURLRequestand it will try to fetch the data in the background. Using delegate methods, you can then ‘respond’ to failures or success.You can create the
NSURLRequestlike this:(More information and an example)