How to use proxy for cross domain ajax in wordpress
-
Hi, i am working with api in my client website https://citystir.com i like to use the cross domain api request. I have found some cool php script for proxy but it is not working in my theme.
here is the php class: https://www.troywolf.com/articles/php/class_http/
here is a thread that the code i am using for calling the class: https://www.daniweb.com/code/snippet216729.htmlThe concept is calling the script via get request and sending the requesting the cross domain url via get variable. like this:
https://yourdomain.com/proxy.php?url=https://www.api.com/api_url
I have placed the proxy.php file in my theme root and calling the php file. The wordpress should find the php script but i am having a 404 in firebug. Do anyone know how to do it?
- The topic ‘How to use proxy for cross domain ajax in wordpress’ is closed to new replies.