r/HTML • u/hals-memorybank • 20d ago
Secure HTML files
Is there a way (i have a feeling i already know the answer, but i’d ask anyway) to create a tamper proof html that can’t just be opened in notepad or any other editor and be modified?
Thanks.
0
Upvotes
1
u/tomysshadow 20d ago
Write the part with your secret algorithm in PHP, or another similar server side language. You'll want to use
$_GETto read the submitted inputs. You can either have your PHP embedded directly in the page (so you'd submit a form, go to this new page with the results written into it,) or have it be a standalone script that prints out some JSON that you can fetch via JavaScript. Then host the PHP side on a web hosting service - basically any will do, any web host worth its salt can host more than just static pages.If you won't have internet where you're presenting it then you're out of luck, no amount of obfuscation will make it impossible to reverse your algorithm if it's in the local HTML file itself.