1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[step-by-step] how I stay motivated and focused on my goals.

Discussion in 'CPA' started by mic22, Mar 25, 2012.

  1. mic22

    mic22 Newbie

    Joined:
    Apr 3, 2010
    Messages:
    37
    Likes Received:
    10
    Hi.
    This method works for me great.
    Many CPA networks provides postback URL which is required to implement my method.
    Okay, so first step is setup of our custom postback. (host with PHP and database required)
    Here is the code I used:
    PHP:
    <?
    //filename: postback.php
    $sql_conn=mysql_connect('localhost''username''pasword');
    mysql_select_db('database_name');
    $sql='INSERT INTO `leads` (`id`, `offer_id`, `payout`, `date`, `network`) VALUES (NULL, \''.$_GET['offer_id'].'\', \''.$_GET['payout'].'\', NOW(), \''.$_GET['network'].'\');';
    mysql_query($sql);
    mysql_close($sql_conn); 
    ?>
    and MySQL scheme:
    Code:
    CREATE TABLE `leads` (
      `id` int(11) NOT NULL auto_increment,
      `offer_id` varchar(100) character set utf8 NOT NULL,
      `payout` varchar(100) character set utf8 NOT NULL,
      `date` datetime NOT NULL,
      `network` varchar(200) collate latin1_general_ci NOT NULL,
      PRIMARY KEY  (`id`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=1 ;
    After that update postback URL in the network you use
    eg.
    Code:
    http://yourdomain.com/postback.php?offer_id={offer_id}&payout={payout}&network=blablanetwork
    The next step is create RSS feed of database records:
    PHP:
    <?
    //filename: feed.php
    header("Content-Type: application/xml; charset=utf-8");
    ?>
    <rss version="2.0">
        <channel>
            <title>My Earnings</title>
            <description>nvm</description>
            <link>http://yourdomain.com/</link>
            <pubDate><?= date("r"?></pubDate>
    <?
    $sql_conn=mysql_connect('localhost', 'username', 'pasword');
    mysql_select_db('database_name');
    $sql='SELECT * FROM `leads` ORDER BY `id` ASC ';
    $query=mysql_query($sql);
    $i=0;
    while ($row = mysql_fetch_row($query)) {
    ?>
    <item>
        <title><?= $row[1?></title>
        <description><?= $row[2?></description>
        <link>http://yourdomain.com/<?= $i ?></link>
        <author><?= $row[4?></author>
        <pubDate><?= date("r"strtotime($row[3])) ?></pubDate>
        <guid>http://yourdomain.com/<?= $i++ ?></guid>
    </item>
    <?
    }
    mysql_close($sql_conn); 
    ?>
        </channel>
    </rss>
    And finally:
    Get an http://ifttt.com/ account
    Create a task "if Feed then SMS"
    As feed URL enter http://yourdomain.com/feed.php
    In action message put eg.
    Code:
    payout: ${{EntryContent}} offer: {{EntryTitle}} {{EntryPublished}} {{EntryAuthor}}
    You are done now.
    Every time you make lead you'll recive SMS with payout, offer, date and network.
    Save ifttt phone number and link it with custom ringtone.
    It is so much fun and it really can be motivational!
     
    • Thanks Thanks x 3