3 ms·
Seeing that code, I could guess that you want to hide that request because, if people saw it, they'd notice that you can just call it repeatedly with different
by genezeta 2y ago
Seeing that code, I could guess that you want to hide that request because, if people saw it, they'd notice that you can just call it repeatedly with different ids and massively vote comments, which is mildly bad. Not only that, but you can probably just use any user id and just spam-vote anything by massively impersonating other users, which is worse than the previous option.
If that's why you want to hide the request, then I have to say you're doing it wrong.
On the one hand, it's wrong because no matter how you hide that code, I can just open the Network tab in the browser's console and see the request anyway. In fact, my browser is so friendly it offers me to "Edit and resend" the request and I don't need any coding skills to do that.
On the other hand, it's wrong because the problem is not located there, in that code. The problem is located in handcmmt.php and in the way you handle identification. handcmmt.php shouldn't need to receive the user id at all.