I need a simple function in objective C to get data from a webserver, something like the php function file_get_contents, I dont need to submit any POST data so its gona be simple.
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
Depends a bit on the contents of the data you want to retrieve. As an example, if the data can be interpreted as a UTF8-encoded string you could use:
If you just want to get bytes of data without interpreting as a string you can also do this:
You then have all the data available to parse out however you need to.