Hi, I would like to create a PHP script that allow user to try PHP coding online. user can see the result from their code. Can anyone please guide me how to do that or where to download the script like that ? Thank you
Not necessarily dangerous - you could create random db-setup for each user, limit exec() and other executables, and run each instance in a sandbox - but I'm guessing this is all a bit beyond the capabilities of the original poster.
I think you would be taking a lot of risk in allowing users to post whatever to your server. If you want to go with the plan however, it is better that you keep two things in mind. 1 - disable many extentions like curl, splFileObject.. 2 - to protect your data, or others (if you are in a shared hosting) you should have your own specific private server, you can get one from vpscorner for $10 a month, and upload your site there. So, it the server is only hosting one site, then if someone hacks that, you can't endanger yourself or others. Finally, I would suggest your learn a little about AJAX, and PHP's eval function to create this script. Good luck