yacg and cloaking

Status
Not open for further replies.


yeah it works fine actually. just go into the cloaking hook, and add an if statement like this:

PHP:
if ($cloakdirective == 1){
     ?>
     <script type="text/javascript">
     <!--
     //window.location = "http://google.com"
     //-->
     </script>
  <?}
also, you will need to set cloaking to something other than 4 in your config.inc.php file. this should work just fine - i would also recommend updating the bots ip list from your admin console.

also, please do not throw a yacg site up with debug mode on, the default kw list, or the default template!!!! i have been seeing this more and more lately and it is only going to help those who are interested in detecting and subsequently reporting yacg installs.

also, why didn't you ask this in the yacg forums? i have never found a forum that is so helpful and will put up with so much crap from n00bs as that forum. filled with really awesome posters who don't mind answering the same question 2 billion times... although lately some have been putting their proverbial foot down and (graciously) asking new posters to read all the threads, or at least use the search feature before starting a new thread.
 
i got it working using a script i found on another site, just had to mod it a bit, its only user agent checking but as the sites dont last long anyway it will do.

i use it in the main page template and it seems to work fine

as for the yacg forum, i cant get on there i applied for membership and heard nothing

PHP:
<?
error_reporting(0);
$clientip = $_SERVER['REMOTE_ADDR'];
  // find out the domain:
  $domain = $_SERVER['HTTP_HOST'];
  // find out the path to the current file:
  $path = $_SERVER['SCRIPT_NAME'];
  // put it all together:
  $url = "http://" . $domain . $path;

$redirect = "http://www.mylink";

$agent = "Rabbit Fire Storm".strtolower($_SERVER['HTTP_USER_AGENT']);

if(strpos($agent, "google") != ""){
$search = "1";
}
if(strpos($agent, "altavista") != ""){
$search = "1";
}
if(strpos($agent, "msn") != ""){
$search = "1";
}
if(strpos($agent, "slurp") != ""){
$search = "1";
}
if(strpos($agent, "lycos") != ""){
$search = "1";
}
if(strpos($agent, "teoma") != ""){
$search = "1";
}
if(strpos($agent, "yahoo") != ""){
$search = "1";
}
if(strpos($agent, "slurp") != ""){
$search = "1";
}
if(strpos($agent, "rss") != ""){
$search = "1";
}
if(strpos($agent, "scooter") != ""){
$search = "1";
}
if(strpos($agent, "bot") != ""){
$search = "1";
}


if($search == "1"){
include('$url');
} else{
header("Location: $redirect");die();
}

?>

i think the problem with this forum is a lot of script kiddies see themselves as 'l33t' hence the garbage replies. but thanks to those with postive input
 
Status
Not open for further replies.