Ajax get call - Cross site, any solution?
-
25-05-2021 - |
Pergunta
Is there any way, where I can make a cross site get call to another server, so I can grab some content?
If no, anyone know a better solution, so I can get all html imported to another site?
Solução
use a server proxy to sit between you and the remote site or you can use jsonp if the server on other domain supports it ...
Outras dicas
What I usually do is set up a PHP page
fetcher.php
<?php
die(file_get_contents('http://www.otherdomain.com/service.aspx'));
?>
Then your ajax can just get fetcher.php
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow