0

friends..

Now, I 'm trying to get website title from the url.. To do that , I should get http content first....

I used stringWithContentsOfURL to get http contents according to this following example.. Reading HTML content from a UIWebView

When I try "http://www.apple.com" , I got correct results..

But, in case of "http://www.google.co.hk", I always get nil..

What's the problem in above code?

To get website contents always, how can I do that?

please help me...

thanks.

Community
  • 1
  • 1
Excalibur
  • 325
  • 2
  • 5
  • 15

1 Answers1

1

The problem is that URL is wrong. Try http://www.google.com.hk instead of http://www.google.co.hk

JOM
  • 8,139
  • 6
  • 78
  • 111
  • Dear,jom Thanks for your answer.. when I try http: //www.google.co.kr , I also can't get correct result. how can I solve this? thanks – Excalibur Oct 17 '11 at 06:55
  • Your url is now right and the page does have title tag? Should work, what is the problem? You are checking for @"document.title" right? – JOM Oct 17 '11 at 11:00