Andrio_Celos

Untitled

Jun 26th, 2015
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.12 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html style="height:100%;margin:0px;padding:0px;overflow:hidden">
  3. <body style="height:100%;margin:0px;padding:0px;overflow:hidden">
  4. </body>
  5. <?php
  6. if($_SERVER["REQUEST_METHOD"] == "POST"){
  7.  
  8.  
  9. $site = $_POST["site"];
  10. if(!empty($site)){
  11.  
  12. echo $site;
  13.  
  14.  
  15. echo '<iframe src="' . stripslashes($site) . '" style="width: 100%; height: 100%;"> </iframe>';
  16. if(empty($site)){
  17. echo "<form action=\"test.php\" method=\"post\"> \n
  18. Site: <input type=\"text\" name=\"site\"><br> \n
  19. <input type=\"submit\"> \n
  20. </form>
  21. ";
  22. };
  23. }else{
  24.  
  25.  
  26. echo '<font color="red">Error: illegal site name!</font>';
  27. };
  28. }elseif($_SERVER["REQUEST_METHOD"] == "GET"){
  29.  
  30.  
  31. $site = $_POST["site"];
  32. if(empty($site)){
  33.  
  34.  
  35. echo '<iframe src="' . stripslashes($site) . '" frameborder="0" style="overflow:hidden;height:100%;width:100%" height="100%" width="100%"> </iframe>';
  36. }else{ //3
  37.  
  38.  
  39. echo '<font color="red">Error: illegal site name!</font>';
  40. };
  41. };
  42. if(empty($site)){
  43. echo "<form action=\"test.php\" method=\"post\"> \n
  44. Site: <input type=\"text\" name=\"site\"><br> \n
  45. <input type=\"submit\"> \n
  46. </form>
  47. ";
  48. };
  49. ?>
  50. </body>
  51. </html>
Advertisement
Add Comment
Please, Sign In to add comment