[GET] Simple Redirect Script for splittest networks.
2015-01-16, 02:17 AM, (This post was last modified: 2015-01-16, 02:18 AM by oskarkxyz.)
#1
Hi.

Found lot of usefull stuffs over here so I wanted to share something what I did. It isn't really hard to do, but I guess maybe someone could find this usefull.

I belive it's a good way for splittest. Let's say you got 3k visitors per day. So you will get (in my example) 1k visitor per cpa network and you will see which network is the best.

Before we even start please remember that I am a really newbie in any coding/programming and I am sure that it could be more easier or better. If you got any suggestions feel free to reply here.
[hide]
Let's start. At first we need to create a table in our MySQL database. Just cope whole text to your mySQL phpmyadmin at "SQL".
Keep in mind that you can change your table name or column name.
Code:
CREATE TABLE download
(
n int(1)
);
INSERT INTO download values (1);
And press execute.
Now we have our table, so this part is done. Now create a new php file and copy text below to this file + change your mysql data and URLs.
Code:
<?php

$link = mysql_connect('MYSQL HOST', 'YOUR LOGIN', 'YOUR PASSWORD');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
    mysql_select_db('YOUR DATABASE');
    $code = mysql_query("SELECT n FROM download");
$row = mysql_fetch_array($code);

if ($row['n'] == "1")
{
    mysql_query("UPDATE download
    SET n=2");
    header("Location: www.example.com");
    mysql_close($link);
}
if ($row['n'] == "2")
{
    mysql_query("UPDATE download
    SET n=3");
    header("Location: www.cpagrip.com");
    mysql_close($link);
}
if ($row['n'] == "3")
{
    mysql_query("UPDATE download
    SET n=1");
    header("Location: www.adworkmedia.com");
    mysql_close($link);
}
mysql_close($link);
?>
[/hide]
If you don't understand how it works let me explain you.
1. Someone go to your download link and go to www.example.com at first.
2. Second person goes to cpagrip.com
3. Third goes to adworkmedia.com
4. Fourth goes again to example.com

That's all. Now let's say that you drop download.php file in your public_html folder (straight after getting in to your hosting). So you set your download button redirect to "www.yoursite.com/download.php"

Regards.
Reply
Share This Thread :

2015-01-16, 11:44 AM,
#2
Thank you #oskarkxyz , will try for sure your Redirect Script

[Image: bg.png]
Reply
2015-01-16, 02:29 PM,
#3
Seems like a redirect champ..

[Image: ytsrcpae_500x90.jpg]
Reply
2015-01-16, 02:30 PM, (This post was last modified: 2015-01-16, 02:30 PM by oskarkxyz.)
#4
(2015-01-16, 02:29 PM)Krrish Wrote: Seems like a redirect champ..

Well I said that's nothing big before hide tag. Made it by myself and wanted to share it. If you feel like this is nothing you still can press "thanks" again to take it back.
Reply


Related Threads
Thread Author Replies Views Last Post
  [FREE] Cloak Script Watt 76 8,597 2018-07-19, 08:52 AM
Last Post: hutiya
  [GET] HQ PHP Script - Watch Movies Online - GROF 63 20,925 2018-07-17, 04:41 PM
Last Post: ℛage
  Google URL Redirect Kjartansson 7 445 2018-07-05, 08:40 AM
Last Post: daddyoh
  [TEMPLATE] Online Generator With Force Like and Share Script and Connect to FB Twisted Fate 71 11,525 2018-06-27, 08:06 PM
Last Post: salen72
  SUPER VIRAL - TANKI ONLINE HACK GENERATOR SCRIPT KingSEO 118 26,853 2018-06-18, 06:03 AM
Last Post: yamacha





About Us | Contact Us | CPA Elites | Advertise | Stats

© 2013-2018 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top