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

Execute DMR script

Discussion in 'PHP & Perl' started by pshbl1, Oct 10, 2009.

  1. pshbl1

    pshbl1 Guest

    I'm using the following scripts, nothing unusual just the normal DMR;

    Traffic first goes to this script;

    echo "<meta http-equiv=\"refresh\" content=\"0;url=http://www.xxx.com/t2.php\">";
    Which then executes the following script;

    // Open our links file
    $sites = array_map("trim", file("links.txt"));
    // Grab a random URL
    $redirect = $sites[array_rand($sites)];
    $referer = $_SERVER['HTTP_REFERER']; if($referer == "")
    // Redirect to our Random URL
    echo "<meta http-equiv=\"refresh\"content=\"0;url=http://".$redirect."\">"; 
    // Referrer is not blank send traffic to our homepage
    echo "<meta http-equiv=\"refresh\" content=\"0;url=http://www.yoursite.com\">";    
    I want to dilute the conversion rate and have tried executing the first script via a CRON job however I assume due the the META REFRESH the second script is not being executed.

    How can I automate execution of the second script but still keep the referrer blank? Any advice gratefully received as this is stopping my campaign going live and is doing my swede in.
  2. XoC--

    XoC-- Jr. VIP Jr. VIP Premium Member

    Mar 5, 2009
    Likes Received:
    If you use curl to execute the script you can blank the referer
    Try setting up your cronjob to look like this:

    /usr/bin/curl -e "" http://www.xxx.com/t2.php
    Hope that helps!