Cloaking script

andrewpad

Newbie
Joined
Sep 11, 2018
Messages
1
Reaction score
0
Hi guys. I'm looking for a simple cloaking script. Requirements:

- Redirect visitors ONLY from search engines to a target URL;
- DO NOT redirect a visitor with direct referrers.

Where can I found one?
 

SoccerLover

Interested in BHW events
Joined
Jun 12, 2014
Messages
4,845
Reaction score
2,505
Website
www.blackhatworld.com
giphy.gif
 

Sephrata

Jr. VIP
Jr. VIP
Joined
Mar 25, 2017
Messages
2,715
Reaction score
3,899
Hi guys. I'm looking for a simple cloaking script. Requirements:

- Redirect visitors ONLY from search engines to a target URL;
- DO NOT redirect a visitor with direct referrers.

Where can I found one?

This is something that can be easily coded in PHP.

You don't need to pay $100s a month for a cloaker...
 

Nut-Nights

Jr. VIP
Jr. VIP
Joined
Jun 20, 2013
Messages
10,091
Reaction score
7,021
Website
shoppy.gg
This is something that can be easily coded in PHP.

You don't need to pay $100s a month for a cloaker...
+1 For that

There is free script which allow visitors from specific source you need to do some search
 

KevinWIlliams

Newbie
Joined
Apr 11, 2019
Messages
1
Reaction score
0
Hi All, I am looking for a similar script where in the user gets the landing page where I want the user to be and bots/ campaign reviewer gets the landing page what they want to see. I don`t mind paying for the script. Let me know if anyone can help? Skype: [email protected]
 

bartosimpsonio

Jr. VIP
Jr. VIP
Joined
Mar 21, 2013
Messages
19,732
Reaction score
22,272
Hi All, I am looking for a similar script where in the user gets the landing page where I want the user to be and bots/ campaign reviewer gets the landing page what they want to see. I don`t mind paying for the script. Let me know if anyone can help? Skype: [email protected]

It won't be easy detecting who the campaign reviewer is unless you know something about them (country, region, etc) and that they won't use a VPN or some other way to bypass your checks. Caveat emptor.
 

CyberAlien

BANNED
Joined
Apr 14, 2010
Messages
596
Reaction score
289
Something like this should work. Could also be done in javascript.

Code:
if (strpos($_SERVER['HTTP_REFERER'], 'google.com') !== false || strpos($_SERVER['HTTP_REFERER'], 'yahoo.com') !== false || strpos($_SERVER['HTTP_REFERER'], 'bing.com') !== false ||) {
    header('Location: http://www.your-landing-page.com');
    exit;
} else {
    header('Location: http://www.send-bad-traffic-someone-else.com');
    exit;
}
 

2tunnels

Newbie
Joined
Jul 28, 2016
Messages
20
Reaction score
2
PHP:
<?php

function redirectOrganicTraffic()
{
    $referer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';

    // Do not redirect if referer is missing.
    if (!$referer) {
        return;
    }

    // Parse hostname from URL.
    $host = parse_url($referer,  PHP_URL_HOST);

    // Do not redirect if hostname is missing.
    // This might happen if referer is invalid URL.
    if (!$host) {
        return;
    }

    // Remove leading www from hostname.
    $host = preg_replace('/^www\./i', '', $host);

    // Add more search engine domains if you need.
    $searchEngines = [
        'google.com',
        'bing.com',
        'duckduckgo.com',
    ];

    foreach ($searchEngines as $searchEngine) {
        if ($host === $searchEngine) {
            header('Location: https://example.com/?page=money');
            exit;
        }
    }
}

redirectOrganicTraffic();

?>

<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>Hello, world!</title>
</head>
<body>
    <h1>Hello, world!</h1>
</body>
</html>
 

2tunnels

Newbie
Joined
Jul 28, 2016
Messages
20
Reaction score
2
I wouldn't call this example cloaking, looks more like prelander.
Basically it's a link that has onclick event handler that replaces window location (redirects without back button history).

From page source:

1. Declare URL as url variable.

HTML:
<script>var url = 'https://t2m.io/TH2n4NiK';</script>

2. Add link with url id.

HTML:
<a href="#" id="url" class="btn btn-warning btn-lg" style="font-size:200% !important; margin-top: 10px;">Klicken Sie hier.</a>

3. Find link by getElementById function and add onclick event handler.

Code:
<script>
document.getElementById("url").onclick=gogogo;
       
function gogogo()
{
    top.location.replace(url);
    return false;
}
</script>
 

xoftmade

Jr. VIP
Jr. VIP
Joined
Apr 3, 2015
Messages
376
Reaction score
96
This simple script you can get in stackoverflow not paid and use if you wana advance level script then hire a developer to develop this
 

Zakch93

Power Member
Joined
Mar 7, 2020
Messages
557
Reaction score
141
Necroing this thread to ask about how to use that script for each post on a custom site made on NGINX.
 

Zakch93

Power Member
Joined
Mar 7, 2020
Messages
557
Reaction score
141
Necroing this thread to ask about how to use that script for each post on a custom site made on NGINX.
 
Top