Hello!
This is for the iphone
This is what i am trying to achieve:
This website expands URLs like bit.ly/miniscurl the creator got an API that says that all you have to do is go to this website:
http://expandurl.appspot.com/expand?url=YOURURL
so when i put:
http://expandurl.appspot.com/expand?url=bit.ly/miniscurl
it returns a new website with this information:
{
"status": "OK",
"end_url": "http:\/\/miniscurl.dafk.net",
"redirects": 1,
"urls": ["http:\/\/bit.ly\/miniscurl", "http:\/\/miniscurl.dafk.net"],
"start_url": "http:\/\/bit.ly\/miniscurl"
}
And that is great! but how do i get that information into an NSString and then search through it for the different tags. so that at last got this:
NSString *status = OK;
NSString *end_url = http:\/\/miniscurl.dafk.net";
etc...
Also a NSArray containing all the redirects (if there are more than one) would have been great!
Conclusion:
I need:
- a fast and easy way to get HTML source from a website.
- a fast and easy way to search through NSString and cut it up in different pieces.
Thank you!
Best regards Kristian