sa - PHP Online

Form of PHP Sandbox

Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php in the places where the PHP script should be executed.



Your result can be seen below.

Result of php executing





Full code of sa.php

  1. <?php
  2. echo '<html><head>';
  3. echo '';
  4. echo '<link rel="stylesheet" href="css/bootstrap.min.css">';
  5. echo '<link rel="stylesheet" href="css/style.css">';
  6. echo '<link rel="shortcut icon" href="images/veldoryalogo.png" type="image/x-icon">';
  7. echo '<script type="text/javascript" src="js/jquery.min.js"></script>';
  8. echo '<script type="text/javascript" src="js/bootstrap.min.js"></script>';
  9. echo '<script type="text/javascript" src="js/js.cookie.js"></script>';
  10. echo '<title>Veldorya RGB</title>';
  11. echo '</head>';
  12. echo '';
  13. echo '<body id="bg" class="container" style="font-family: Quicksand;">';
  14. echo '';
  15. echo '<div id="hexColorTemplate" style="display:none;">';
  16. echo '<div class="row">';
  17. echo '<label for="color-$NUM">Renk #$NUM</label>';
  18. echo '<input class="form-control col-md-1 hexColor" id="color-$NUM" style="border-radius: 10px;" value="$VAL" data-jscolor="{preset:\'small dark\', position:\'right\'}" oninput="javascript: updateOutputText(event)" onchange="javascript: updateOutputText(event); Cookies.set(`#${$NUM}`, document.getElementById(\'color-$NUM\').value, { expires: 7, path: \'\' })">';
  19. echo '</div>';
  20. echo '</div>';
  21. echo '';
  22. echo '<div id="content">';
  23. echo '<h1 id="title">Veldorya RGB</h1>';
  24. echo '<p id="graylabel1" class="gray" style="padding-bottom: 10px;"></p>';
  25. echo '<div class="container-fluid">';
  26. echo '<div class="row">';
  27. echo '<div class="col-md-2" style="padding-left: 0;">';
  28. echo '<div id="hexColors" class="container-fluid">';
  29. echo '<!-- Will be populated in JavaScript -->';
  30. echo '</div>';
  31. echo '</div>';
  32. echo '<div class="col-md-10" style="padding-right: 0;">';
  33. echo '<div class="container-fluid">';
  34. echo '<div class="row">';
  35. echo '<div id="output">';
  36. echo '<label id="label4" for="outputText">Çıktı</label>';
  37. echo '<label id="graylabel2" class="gray" for="outputText" style="font-weight: normal;">RGB yazılar için burayı kopyala!</label>';
  38. echo '<pre id="outputText" style="border-radius: 10px; white-space: pre-wrap; height: 70px; margin-right: 15px; font-family: MinecraftRegular; margin-bottom: 5px;" onclick="copyTextToClipboard(this.textContent);"></pre>';
  39. echo '<p id="error">256 karakterden fazla olduğu için kutuya sığmayabilir.</p>';
  40. echo '</div>';
  41. echo '</div>';
  42. echo '<div class="row">';
  43. echo '<div id="coloredNick" class="minecraft"></div>';
  44. echo '</div>';
  45. echo '<div class="row">';
  46. echo '<div class="col-md-3" style="padding-left: 0;">';
  47. echo '<label for="nickname">Mesaj</label>';
  48. echo '<input class="form-control" id="nickname" type="text" maxlength="100" placeholder="Your Text" value="Veldorya" oninput="javascript: updateOutputText(event);" onchange="javascript: updateOutputText(event)">';
  49. echo '</div>';
  50. echo '</div>';
  51. echo '<div class="row">';
  52. echo '<div class="col-md-3" style="padding-left: 0;">';
  53. echo '<label for="output-format">Çıktı formatı</label>';
  54. echo '<select id="output-format" class="form-control" onchange="updateOutputText(event);">';
  55. echo '<option value="0">Normal (&#rrggbb)</option>';
  56. echo '<option value="2">Eski (&x&r&r&g&g&b&b)</option>';
  57. echo '<option value="6">Konsol (§x§r§r§g§g§b§b)</option>';
  58. echo '<option value="8">MOTD (\\u00A7x)</option>';
  59. echo '<option value="1">Sohbet (<#rrggbb>)</#rrggbb></option>';
  60. echo '<option value="7">BBCode [COLOR=#rrggbb]</option>';
  61. echo '</select>';
  62. echo '</div>';
  63. echo '</div>';
  64. echo '<div class="row">';
  65. echo '<div class="col-md-3" style="padding-left: 0;">';
  66. echo '<label for="color-preset">Renk Ayarı</label>';
  67. echo '<select id="color-preset" class="form-control" onchange="preset(this.value); updateOutputText(event); ">';
  68. echo '<option value="0">Yok</option>';
  69. echo '<option value="1">Rengarenk</option>';
  70. echo '</select>';
  71. echo '</div>';
  72. echo '</div>';
  73. echo '<div class="row">';
  74. echo '<label for="numOfColors">Renk Sayısı</label>';
  75. echo '<input class="form-control" style="width: 75px;" value="2" id="numOfColors" type="number" min="2" max="10" onchange="updateOutputText(event); toggleColors(this.value);" oninput="updateOutputText(event); toggleColors(this.value);">';
  76. echo '</div>';
  77. echo '<div class="row">';
  78. echo '<div id="dbold">';
  79. echo '<input type="checkbox" id="bold" onclick="updateOutputText(event);">';
  80. echo '<label for="bold">Kalın</label>';
  81. echo '</div>';
  82. echo '<div id="ditalics">';
  83. echo '<input type="checkbox" id="italics" onclick="updateOutputText(event);">';
  84. echo '<label for="italics">Eğik</label>';
  85. echo '</div>';
  86. echo '<div id="dunderline">';
  87. echo '<input type="checkbox" id="underline" onclick="updateOutputText(event);">';
  88. echo '<label for="underline">Altı çizili</label>';
  89. echo '</div>';
  90. echo '<div id="dstrike">';
  91. echo '<input type="checkbox" id="strike" onclick="updateOutputText(event);">';
  92. echo '<label for="strike">Ortası çizili</label>';
  93. echo '</div>';
  94. echo '<div id="appearance">';
  95. echo '<input type="checkbox" id="darkmode" onclick="darkMode();">';
  96. echo '<label for="darkmode" style="margin-bottom: 0px;margin-top: 0px;"> Karanlık Mod</label>';
  97. echo '</div>';
  98. echo '</div>';
  99. echo '</div>';
  100. echo '</div>';
  101. echo '</div>';
  102. echo '</div>';
  103. echo '</div>';
  104. echo '<script src="js/jscolor.js"></script>';
  105. echo '<script src="js/script.js"></script>';
  106. echo '';
  107. echo '';
  108. echo '';
  109. echo '</body></html>';
  110.  
File Description
  • sa
  • PHP Code
  • 28 Apr-2023
  • 5.05 Kb
You can Share it: