Hi !
I have a set of servers, all under the same domain, but in differente subdomain each
is it possible to do inter-server calls
Hi !
I have a set of servers, all under the same domain, but in differente subdomain each
is it possible to do inter-server calls
AJAX calls are just HTTP requests, so there's no reason a single page could not have JavaScript that makes calls to multiple domains.
I know, however I get a
uncaught exception: Permission denied to call method XMLHttpRequest.open
Error :/ when trying to call from serverA.mydomain.com to serverB.mydomain.com
Hmmm...I learn something new every day. Apparently it's a browser security feature to prevent XSS.
Some possible solutions:
http://www.whenpenguinsattack.com/2007/08/13/using-ajax-across-multiple-domains/
http://jeffreysambells.com/posts/2006/03/06/centralized_ajax_services/
And of course you could handle it purely via PHP by having some sort of server-side script that would call the other domain via cURL or even just file_get_contents(), which you could then call via your AJAX script.
hmm, you are right =)
Now I'll just have to deal on how to log onto the other server, but I think I'll do that with curl =P
When I grow up I wanna be like you NogDog =)
perrohunter wrote:...
When I grow up I wanna be like you NogDog =)
You want to be old, lazy, and out of shape?
NogDog wrote:You want to be old, lazy, and out of shape?
Nah I want to be a PHP/JavaScript/Everything Guru =P