1

Possible Duplicate:
Origin is not allowed by Access-Control-Allow-Origin

I want to access elements from a web page.

for example I am using jquery : $("#links").load('http://www.youtube.com a'); to bring all the links from youtube page to my local page.

But I am not able to do it, getting an error :

XMLHttpRequest cannot load http://en.wikipedia.org/wiki/Special:Search?search=&go=Go. Origin "my local host " is not allowed by Access-Control-Allow-Origin.

When i try to do this with another local page I am getting it.

any help? Hope i explained my question properly.

Community
  • 1
  • 1
Nandan Chaturvedi
  • 1,028
  • 3
  • 16
  • 32

1 Answers1

2

Access-Control-Allow-Origin is the browser preventing the page from loading content from another site. This is a security feature by design (HTTP Access Control).

The only / best way to do it is via a server side page (PHP etc) passing the page to your website.

chrisbradbury
  • 327
  • 1
  • 5