I am wondering if it is possible to use JS (jQuery) to make a $.post
from any website on any domain, to a script on my server?
The reason for this question, is because I do not want to give out my PHP files to the client (and I dont want to spend money on ionCube or the likes), so making the request to my server would not give out my source.
My prefered way would be to simply include a JS file, like
<script src="http://MySite.com/MyScript.js"></script>
and have a function in there that does the Post to my PHP script, however due to the same-origin policy, I cannot do a POST request to a remote server.
I could of course make a proxy.php and make the request to it, but I am trying to keep it in a way so the client only have to include a small snippet into their HTML code, in order to use my app.
Is there a (less painfull) way to do this?