Cross Domain Request Using Javascript


NO, you can't do cross domain request using Javascript, for example to get another content from to your using Ajax. What you can do just create another page containing some php functions like file_get_contents and stream_context_create. The idea is using another page from the same host (so you can use your fancy loading image or alike and make your xml http request works) that get content from another host.

index.php <- xml-http-request -> another-page.php <- file_get_contents+stream_context_create <-

Tidak ada komentar:

Posting Komentar

speak now or forever hold your peace

About Me