post.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <?PHP
  2. /**
  3. * Copyright 2021, 2024 5 Mode
  4. *
  5. * This file is part of LightOff.
  6. *
  7. * LightOff is free software: you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation, either version 3 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * LightOff is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with LightOff. If not, see <https://www.gnu.org/licenses/>.
  19. *
  20. * surf.php
  21. *
  22. * The surfing page.
  23. *
  24. * @author Daniele Bonini <my25mb@aol.com>
  25. * @copyrights (c) 2016, 2024, 5 Mode
  26. */
  27. require("config.inc");
  28. $miourl = filter_input(INPUT_GET, "miourl")??"";
  29. $miourl = strip_tags($miourl);
  30. //echo($miourl);
  31. //exit(-1);
  32. if (mb_stripos($miourl, "/google.it/") > 0): ?>
  33. <html>
  34. <head>
  35. <title>LightOff</title>
  36. <script src="/js/jquery-3.6.0.min.js" type="text/javascript"></script>
  37. </head>
  38. <body>
  39. <div id="content">
  40. <form id="frm" action="/surf.php" method="GET">
  41. <input type="hidden" name="miourl" value="<?PHP echo($miourl);?>">
  42. <?PHP foreach($_POST as $key => $val):?>
  43. <input type="hidden" name="<?PHP echo($key);?>" value="<?PHP echo($val);?>">
  44. <?PHP Endforeach;?>
  45. <?PHP foreach($_GET as $key => $val):?>
  46. <?PHP if ($key !== "miourl"): ?>
  47. <input type="hidden" name="<?PHP echo($key);?>" value="<?PHP echo($val);?>">
  48. <?PHP endif; ?>
  49. <?PHP Endforeach;?>
  50. </form>
  51. </div>
  52. <script>
  53. frm.submit();
  54. </script>
  55. </body>
  56. </html>
  57. <?PHP elseif (mb_stripos($miourl, "/it.search.yahoo.com/") > 0): ?>
  58. <html>
  59. <head>
  60. <title>LightOff</title>
  61. <script src="/js/jquery-3.6.0.min.js" type="text/javascript"></script>
  62. </head>
  63. <body>
  64. <div id="content">
  65. <form id="frm" action="/surf.php" method="GET">
  66. <input type="hidden" name="miourl" value="<?PHP echo($miourl);?>">
  67. <?PHP foreach($_POST as $key => $val):?>
  68. <input type="hidden" name="<?PHP echo($key);?>" value="<?PHP echo($val);?>">
  69. <?PHP Endforeach;?>
  70. <?PHP foreach($_GET as $key => $val):?>
  71. <?PHP if ($key !== "miourl"): ?>
  72. <input type="hidden" name="<?PHP echo($key);?>" value="<?PHP echo($val);?>">
  73. <?PHP endif; ?>
  74. <?PHP Endforeach;?>
  75. </form>
  76. </div>
  77. <script>
  78. frm.submit();
  79. </script>
  80. </body>
  81. </html>
  82. <?PHP else: ?>
  83. <html>
  84. <head>
  85. <title>LightOff</title>
  86. <script src="/js/jquery-3.6.0.min.js" type="text/javascript"></script>
  87. </head>
  88. <body>
  89. <div id="content">
  90. <form id="frm" action="/surf.php" method="GET">
  91. <input type="hidden" name="miourl" value="<?PHP echo($miourl);?>">
  92. <?PHP foreach($_POST as $key => $val):?>
  93. <input type="hidden" name="<?PHP echo($key);?>" value="<?PHP echo($val);?>">
  94. <?PHP Endforeach;?>
  95. <?PHP foreach($_GET as $key => $val):?>
  96. <?PHP if ($key !== "miourl"): ?>
  97. <input type="hidden" name="<?PHP echo($key);?>" value="<?PHP echo($val);?>">
  98. <?PHP endif; ?>
  99. <?PHP Endforeach;?>
  100. </form>
  101. </div>
  102. <script>
  103. frm.submit();
  104. </script>
  105. </body>
  106. </html>
  107. <?PHP Endif; ?>