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

Joomla and CPARedirect

Discussion in 'FaceBook' started by locknload007, Oct 13, 2010.

  1. locknload007

    locknload007 Jr. VIP Jr. VIP Premium Member

    Joined:
    Apr 14, 2010
    Messages:
    475
    Likes Received:
    67
    I got my CPAredirect working on my Joomla index page again. Really cool because if the AM goes snooping around, it will be my home page he sees. I could just put normal ads on it and it will seem like they are converting from it. It may be better to have no impressions and say it is email traffic.

    If you have a Joomla site and was trying to get it to work, I can show you an easy way to get it working.
     
    • Thanks Thanks x 1
  2. bakxos

    bakxos Regular Member

    Joined:
    Aug 8, 2010
    Messages:
    498
    Likes Received:
    292
    Location:
    Scotland
    I am actually trying to make it work at this moment. If i find it too hard, i will simply use WP. Joomla is amazing but WP has dominated pretty much everything.

    It would be great if you could post more info about what you did:)

    Cheers
     
    • Thanks Thanks x 1
  3. GreenGoblin

    GreenGoblin BANNED BANNED

    Joined:
    Jul 17, 2008
    Messages:
    1,493
    Likes Received:
    2,564
    cool, post it here...it would be good info
     
  4. locknload007

    locknload007 Jr. VIP Jr. VIP Premium Member

    Joined:
    Apr 14, 2010
    Messages:
    475
    Likes Received:
    67
    Basically what you are interested in is all the php code from the CPARedirector and all the php code from the index page, put the CPARedirector code on top.

    Another way to say it is to remove the html code at the very bottom of the CPARedirector, the "Fake Landing Page" part

    Code:
    <html>
      <head>
        <title>Your Fake Landing Page</title>
      </head>
      <body>
        <br><br><br><br>
         <center><h1>Your Fake Landing Page</h1></center>
     
      </body>
    </html> 
    put what is left into the index.php file at the very top, before the Joomla code

    Basically the Joomla code has now replaced the "Fake Landing Page" part.
     
  5. locknload007

    locknload007 Jr. VIP Jr. VIP Premium Member

    Joined:
    Apr 14, 2010
    Messages:
    475
    Likes Received:
    67
    This is the standalone version.
     
  6. locknload007

    locknload007 Jr. VIP Jr. VIP Premium Member

    Joined:
    Apr 14, 2010
    Messages:
    475
    Likes Received:
    67
    This is for one offer only. I have some code I did a few months back to add multiple offers. I will go find it now.
     
  7. locknload007

    locknload007 Jr. VIP Jr. VIP Premium Member

    Joined:
    Apr 14, 2010
    Messages:
    475
    Likes Received:
    67
    For multiple offers I did

    Code:
    $mn=$_REQUEST['mn'];
    ini_set( "display_errors", 0);
     
    //Settings
    if ($mn=1234)
    {
    Enter your redirector code, the php code you posted into the index.php page
    }
    
    $mn=$_REQUEST['mn'];
    ini_set( "display_errors", 0);
    if ($mn=2345)
    {
    Enter your redirector code, the php code you posted into the index.php page, change the cpa offer link and the mn
    }
    
    I will add that mine are not mn=1234, I changed mine to example, index.php?nosnoops=9011, so what you do is change the code to

    Code:
    $mn=$_REQUEST['nosnoops'];
    and you wont have to change all the mn

    I kept repeating the $_Request and display_errors code, so it must of not worked with only having it done once at the top, because common sense tells me I should only have to do it once.
     
    Last edited: Oct 13, 2010
  8. dope!

    dope! Newbie

    Joined:
    Oct 27, 2010
    Messages:
    20
    Likes Received:
    1
    Home Page:
    fantastic tip, thanks, I had difficulties to get it work. How should one know, that it's necessary to paste the code in BEFORE any other joomla code.

    In the index of the template it doesn't function.
     
  9. locknload007

    locknload007 Jr. VIP Jr. VIP Premium Member

    Joined:
    Apr 14, 2010
    Messages:
    475
    Likes Received:
    67
    Code:
    <?php
     
    //Standalone CPA Redirector v2
    
    //Settings
    
    $mn=$_REQUEST['mn'];
    ini_set( "display_errors", 0);
     
    //Settings
    if ($mn=1234)
    {
    
    $magic_number = 1234; // Any number you choose except ZERO!
    
    //Drop in your offer link here.
    
    $cpa_offer_url = 'http://myaffiliate.com/mytracking/99999/11111/';
    
    //Don't edit below this line unless you know what you are doing.
    
    if (isset($_GET['mn']) && $_GET['mn']==$magic_number){        
    
            echo '<html><head></head><body><form action="' . 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'] . '" method="post" id="form1">
    
    <input type="hidden"  name="mn" value="' . $magic_number . '" /></form>
    
    <script language="JavaScript"> 
        document.getElementById(\'form1\').submit();
    </script>
    </body>
    </html>
    ';
            return true; 
            exit();
    }
    
    if ($_POST['mn']==$magic_number){        
    
        echo '
    <html>
    <head>
    </head>
    <body>
    <form action="' . 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'] . '" method="post" id="form1">
      <input type="hidden"  name="mn" value="' . $magic_number . $magic_number . '" />
    </form>
    <script language="JavaScript"> 
        document.getElementById(\'form1\').submit();</script>
    </body>
    </html>
    ';
            return true; 
            exit();
    }    
    $dom = preg_replace( "/^www\./", "", $_SERVER[ 'HTTP_HOST' ] ) ;
    $ref= $_SERVER['HTTP_REFERER'];
    
    if (((strpos($ref, $dom)!=FALSE) || (trim($ref)=="" ) )  && ($_POST['mn']==$magic_number.$magic_number)){
            header( 'Location: ' . $cpa_offer_url);
            exit();
        }
    }
    
    /**
    * @version        $Id: index.php 14401 2010-01-26 14:10:00Z louis $
    * @package        Joomla
    * @copyright    Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
    * @license        GNU/GPL, see LICENSE.php
    * Joomla! is free software. This version may have been modified pursuant
    * to the GNU General Public License, and as distributed it includes or
    * is derivative of works licensed under the GNU General Public License or
    * other free or open source software licenses.
    * See COPYRIGHT.php for copyright notices and details.
    */
    
    // Set flag that this is a parent file
    define( '_JEXEC', 1 );
    
    define('JPATH_BASE', dirname(__FILE__) );
    
    define( 'DS', DIRECTORY_SEPARATOR );
    
    require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
    require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
    
    JDEBUG ? $_PROFILER->mark( 'afterLoad' ) : null;
    
    /**
     * CREATE THE APPLICATION
     *
     * NOTE :
     */
    $mainframe =& JFactory::getApplication('site');
    
    /**
     * INITIALISE THE APPLICATION
     *
     * NOTE :
     */
    // set the language
    $mainframe->initialise();
    
    JPluginHelper::importPlugin('system');
    
    // trigger the onAfterInitialise events
    JDEBUG ? $_PROFILER->mark('afterInitialise') : null;
    $mainframe->triggerEvent('onAfterInitialise');
    
    /**
     * ROUTE THE APPLICATION
     *
     * NOTE :
     */
    $mainframe->route();
    
    // authorization
    $Itemid = JRequest::getInt( 'Itemid');
    $mainframe->authorize($Itemid);
    
    // trigger the onAfterRoute events
    JDEBUG ? $_PROFILER->mark('afterRoute') : null;
    $mainframe->triggerEvent('onAfterRoute');
    
    /**
     * DISPATCH THE APPLICATION
     *
     * NOTE :
     */
    $option = JRequest::getCmd('option');
    $mainframe->dispatch($option);
    
    // trigger the onAfterDispatch events
    JDEBUG ? $_PROFILER->mark('afterDispatch') : null;
    $mainframe->triggerEvent('onAfterDispatch');
    
    /**
     * RENDER  THE APPLICATION
     *
     * NOTE :
     */
    $mainframe->render();
    
    // trigger the onAfterRender events
    JDEBUG ? $_PROFILER->mark('afterRender') : null;
    $mainframe->triggerEvent('onAfterRender');
    
    /**
     * RETURN THE RESPONSE
     */
    echo JResponse::toString($mainframe->getCfg('gzip'));
     
  10. dope!

    dope! Newbie

    Joined:
    Oct 27, 2010
    Messages:
    20
    Likes Received:
    1
    Home Page:
    now what is the best way to use it? should I simply store the file with the links on another server?
    my original domain still shows. To check if the meta refresh work, the script from here
    logs the activties and show "direct access" only.
    I've read it's best to use it on a blog to redirect the link juice to a website.
    Using LDR (Link Directory Exchanger 3)
    is predestined for using reziprocal links for my website.

    How do you use it and which 301 shortener is suggested?
     
    Last edited: Dec 15, 2010
  11. moneyrocks

    moneyrocks Supreme Member

    Joined:
    May 22, 2009
    Messages:
    1,205
    Likes Received:
    135
    thanks for this this is good info.... can be very helpful i am using this on one of my sites all ready
     
  12. dope!

    dope! Newbie

    Joined:
    Oct 27, 2010
    Messages:
    20
    Likes Received:
    1
    Home Page:
    how do you exactly use it moneyrocks?
    i guess there are many ways to apply it, but I'm interested in suggestions ; )
    seems like it's a good idea to store the file with the links on other servers.

    UPDATE: found out the most reciprocal link exchangers can't find the link on the destination site. could it depend on meta noindex, nofollow?
     
    Last edited: Dec 15, 2010
  13. MoonDragon

    MoonDragon Registered Member

    Joined:
    Jul 22, 2012
    Messages:
    72
    Likes Received:
    2
    Hello,

    Do I have to zip the above code (in ChrarlesNCharge last post) and upload it as a plugin (joomla 1.5) or to insert it at the top of the index.php (mysite.com/index.php) or is it for index.php of the current template?

    How does it normally works on wordpress? And how does it work on Jommla 1.5?
     
  14. MoonDragon

    MoonDragon Registered Member

    Joined:
    Jul 22, 2012
    Messages:
    72
    Likes Received:
    2
    I made several research and presently I would like to know if I have to change the number 1234 everywhere in the line below...but apparently it seems that I could only rely on myself on this....


    if ($mn=1234) { $magic_number = 1234; // Any number you choose except ZERO!