Okay, so I’m trying to make a barebones comment system inside a PHP page where all the server and client sided code will be inside that page.
My idea is that every time a user loads up the page, a JS script will update a list element inside a page using an array variable set by a PHP echo.
So for example
([NoPaste snippet
Basically this file will hold the serversided comment loading/posting logic and the page with JS itself. I don’t want to make a separate comments.php file as that will increase hit amounts. Every IP has a 5 second cooldown to prevent DDOS attacks, and the comments themselves will be an array inside a JSON file.
How do you turn this code concept into a real thing?