I need to split a php page between two domains. That is, I need to send some variables (including arrays) to a second domain, where some calculations will be done using the variables, then I need to get the results back to the first domain.
Currently I have one php page that takes some variables, does calculations on them and shows the results. I want to share this functionality with owners of other domains while keeping secret how the calculations are done.
I think the best way to do this is to give them a php page that sends the variables to my domain, where the calculations are done, and then send the results back.
I am wondering what the best way to do this will be. I would appreciate a point in the right direction if anyone has done something similar.
Thanks
If the sites using your data are going to be displaying it inline there, this sort of functionality would typically be done with AJAX. Make a page that accepts the variables, performs the calculations, and then outputs the results as JSON. The sites requiring calculations will simply POST their values to your page and capture the results, which are easily parsed in any language.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With