0
Securing variable transfer from js to php
I was working on this project where I needed to send some variable values to a php script so that I can store the data in a text file on server side. The method I used was "$.post" which works just fine but now the thing that is bothering me is that anyone could send the values to that php script with this method which is not what I want because that can ruin the data I'm storing. So, is there any way to make php receive value from a specific JavaScript or Micro-controller (since I'm using the same method to send some sensor data to a php) so that other can't send data to it. I'm also open for any better alternative than this. Thank you.
2 ответов
+ 3
No there's not.
0
I think I've phrased my question in a wrong manner and to avoid such possibility I asked for an alternative if possible.
I was hoping for an easier solution but I guess I will have to go change my approach because this solution at stackoverflow makes more sense
https://stackoverflow.com/questions/37912937/how-to-send-secure-ajax-requests-with-php-and-jquery