3raser Posted February 23, 2010 Share Posted February 23, 2010 I'm not sure if PHP can make this happen.....but I'm trying to make a site that allows people to test their php codes. And this is my current code: <link rel="stylesheet" type="text/css" href="style.css" /> <?php $code = $_POST['code']; if (!$code){ echo "<form action='index.php' method='POST'><input type='submit' value='Submit'><br><textarea cols='120' rows='35' name='code'></textarea></form>"; } else { echo "<div align='left'><form action='index.php' method='POST'><input type='submit' value='Submit'><br><textarea cols='120' rows='35'></textarea></form></align><br>"; echo $code; } ?> And to see what happens, go here http://phptester.webatu.com/index.php Quote Link to comment Share on other sites More sharing options...
aleX_hill Posted February 23, 2010 Share Posted February 23, 2010 Are you missing some code here? There is an echo statement with nothing after it, and no </div> or anywhere to excecute the code. I am not sure as to whether it is possible or not. Quote Link to comment Share on other sites More sharing options...
3raser Posted February 23, 2010 Author Share Posted February 23, 2010 Sorry, it just got cut off when I was copying and pasting. Quote Link to comment Share on other sites More sharing options...
KrisNz Posted February 23, 2010 Share Posted February 23, 2010 So, if I understand correctly, you let people run whatever php code they want on your server? Quote Link to comment Share on other sites More sharing options...
sader Posted February 23, 2010 Share Posted February 23, 2010 what happened to me I was redirected to 000webhost also change </align><br> to simply </div> Quote Link to comment Share on other sites More sharing options...
eugene2009 Posted February 23, 2010 Share Posted February 23, 2010 pretty stupid to do Quote Link to comment Share on other sites More sharing options...
ohdang888 Posted February 23, 2010 Share Posted February 23, 2010 unless you're just amazing beyond belief at security, i wouldn't build that. Thats just asking for people who are looking to hack something for the first time. You can't get much more open than that. Quote Link to comment Share on other sites More sharing options...
thewooleymammoth Posted February 23, 2010 Share Posted February 23, 2010 if you created a virtual server that ran php and had extremely limited installation of php... you could do it. But why? and it would probably be hacked eventually. Quote Link to comment Share on other sites More sharing options...
jay7981 Posted February 23, 2010 Share Posted February 23, 2010 thats more than likely why it is down pending review atm .... Quote Link to comment Share on other sites More sharing options...
Mchl Posted February 23, 2010 Share Posted February 23, 2010 Awww... so it's down already? Last time someone did something like this I had lots of fun messing with their database. Quote Link to comment Share on other sites More sharing options...
jay7981 Posted February 23, 2010 Share Posted February 23, 2010 LOL we are sooo evil ... Quote Link to comment Share on other sites More sharing options...
salathe Posted February 23, 2010 Share Posted February 23, 2010 Unless you're willing to go along the route of how sites like codepad.org work, it might very well be an idea to abandon this particular project early especially if you want to keep your hosting account intact. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.