But, if you have a Sub Affiliate link, the "subid=0" value will be different, like: This "subid" value is associated with a specific Sub Affiliate for which you created the link. You may view and compare activity through different Sub Affiliate links in the Multiple Affiliate Site and Sub-site Sales & Activity reports. if (strpos($url, "amazon.com") != FALSE) { $amazon_id = $sid_db; } if (strpos($url, "click.linksynergy.com") != FALSE) { $site['s_url'] = str_replace ("subid=0", "subid=$sid_db", $url); } if (strpos($url, "click-2639725") != FALSE) {$site['s_url'] = "{$site['s_url']}"."?sid=$sid_db";} if (strpos($url, "click-1630418") != FALSE) {$site['s_url'] = "{$site['s_url']}"."?sid=$sid_db";} //sray click.linksynergy.com/fs-bin/click?id=rsvSHsEFCjk&offerid=130188.10003993&type=3&subid=0 click.linksynergy.com/fs-bin/click?id=rsvSHsEFCjk&offerid=130188.10003993&type=3&subid=0&u1=23aadae1ff1ca7 http://www.anrdoezrs.net/click-1630418-10358667 ehealth cj qhi account www.dpbolvw.net/click-2639725-4975959 cj aafter account http://clickserve.cc-dt.com/link/tplclick?lid=41000000000909736&pubid=21000000000143498 //performics http://clickserve.cc-dt.com/link/tplclick?lid=41000000010825647&pubid=21000000000143498&mid=xxx orders.directlabs.com/dl-locator/order_tests.aspx?re=43 Sub Affiliate Options: If you would like to use our sub affiliate option please follow our instructions below. This can be used to track which creative, website or affiliate is performing best for you. After zoneId/0000 please add: ?sub=XXXX (on ALL HREF's) (where XXXX is your subcode). EXAMPLE: http://click.linkstattrack.com/zoneid/0000?sub=mysubcode Big Bills and No Way to pay them today? http://record5.govrecords.hop.clickbank.net/?tid=TRACK124 http://record5.respyware.hop.clickbank.net/?ss=undercover&m=lpbuym10&tid=testtid http://fastpc.paretologic.revenuewire.net/regcure/homepage?yourcustomcodehere http://affiliateid.merchantid.revenuewire.net/productname?yourcustomcodehere */ $url = $site['s_url']; //sray 121909 if ($_GET['keys']=='products') { $url = $_GET['prod_url']; // $url = urldecode ($url); $url = urlencode($url); // this is to solve mystry url problem with extra amp stuff //echo $url; exit; //echo '
'; $url = str_replace( '%26amp%3B', '%26', $url); $url = urldecode($url); //http://www.teddy9.com/spons_redir.php?id=52701&keys=products&prod_url=http://clickserve.cc-dt.com/link/ddiprod?lid=41000000026936737&pid=B002PE7FU2 //http://clickserve.cc-dt.com/link/ddiprod?lid=41000000026936737&pid=B002PE7FU2 // $site['s_url'] = "$url".'&'.'pid='.$_GET['pid']; //temporaru solution must be solved by urlencdoe $site['s_url'] = $url; // $url = $site['s_url']; // echo $site['s_url']; exit; } //sray 121909 $site['s_url'] = str_replace ("replace_search_string", "$term_db" , $url); $result_amazon = strpos($url, "amazon"); $result_linkshare = strpos($url, "linksynergy"); $result_cj_aafter = strpos($url, "click-2639725"); if ($result_cj_aafter != FALSE){ $site['s_url'] = str_replace ("click-2639725", "click-3009507", $url ); } $result_cj_qhi = strpos($url, "click-1630418"); if ($result_cj_qhi != FALSE){ $site['s_url'] = str_replace ("click-1630418", "click-3009507", $url ); } $result_cj_aafter = strpos($site['s_url'], "click-3009507"); //print $url; //exit; //$result_cj_aafter = strpos($url, "click-3009507"); $result_performics = strpos($url, "cc-dt"); $result_direct_lab = strpos($url, "directlabs"); $result_careington = strpos($url, "careington"); $result_clickbank = strpos($url, "clickbank"); $result_clickbank_last_char = substr($url, -1); $result_revenuewire = strpos($url, "revenuewire"); $result_linkstattrack = strpos($url, "linkstattrack"); if ($result_amazon != FALSE) { $amazon_id = $sid_db; } if ($result_linkshare != FALSE) { $site['s_url'] = "{$site['s_url']}"."&u1=$sid_db";} if ($result_cj_aafter != FALSE) {$site['s_url'] = "{$site['s_url']}"."?SID=$sid_db";} // if ($result_cj_qhi != FALSE) {$site['s_url'] = "{$site['s_url']}"."?sid=$sid_db";} //sray if ($result_performics != FALSE) { $site['s_url'] = "{$site['s_url']}"."&mid=$sid_db";} // if ($result_direct_lab != FALSE) {$site['s_url'] = "{$site['s_url']}"."&sid=$sid_db";} //sray // if ($result_careington != FALSE) {$site['s_url'] = "{$site['s_url']}"."&sid=$sid_db";} //sray if (($result_clickbank != FALSE)and ($result_clickbank_last_char=='/')) {$site['s_url'] = "{$site['s_url']}"."?tid=$sid_db";} //sray if (($result_clickbank != FALSE)and !($result_clickbank_last_char=='/')) {$site['s_url'] = "{$site['s_url']}"."&tid=$sid_db";} //sray if ($result_revenuewire != FALSE) {$site['s_url'] = "{$site['s_url']}"."?$sid_db";} //sray if ($result_linkstattrack != FALSE) {$site['s_url'] = "{$site['s_url']}"."?sub=$sid_db";} //sray //$site['s_url'] = "{$site['s_url']}"."?sid=$sid_db"; //sray //print $site['s_url']; //sray //print $GLOBALS['term']; //exit; //sray //print $result_linkshare; $today = floor(time()/86400); $res = mysql_query("SELECT * FROM $visitable WHERE v_site='$id' AND v_ip='$ip' AND v_day=$today") or die(mysql_error() . __line__); //if (mysql_num_rows($res) == 0) { $term_db_track = strtolower($term_db); $term_db_track= str_replace("'", "", $term_db_track); // mysql_query("INSERT INTO $visitable VALUES(0,'$id',$today,'".base64_decode($en['keys'])."','$ip','$sid_db', NOW() )") or die(mysql_error() . __line__); mysql_query("INSERT INTO $visitable VALUES(0,'$id',$today,'".addslashes ($term_db_track)."','$ip','$sid_db', NOW(), '$ibo_id_db', '$ref_db' )") or die(mysql_error() . __line__); // mysql_query("UPDATE $membtable SET m_balance=m_balance-$site[s_bid] WHERE m_balance>0 AND m_id=$site[s_user]") or die(mysql_error() . __line__); // } if (strtolower(substr($site['s_url'],0,7)) == 'http://') $site['s_url'] = substr($site['s_url'],7); if (strtolower(substr($site['s_url'],0,8)) == 'https://'){ $site['s_url'] = substr($site['s_url'],8); header("Location:https://".$site['s_url']); exit; } //clickserve.cc-dt.com/link/ddiprod?lid=41000000026936708&mid= //clickserve.cc-dt.com/link/ddiprod?lid=41000000026936737&pid=B001RPOCD8&mid= //clickserve.cc-dt.com/link/ddiprod?lid=41000000026936737&pid=B001RPOCD8&mid= //http://www.teddy9.com/spons_redir.php?id=52701&keys=products&prod_url=http%3A%2F%2Fclickserve.cc-dt.com%2Flink%2Fddiprod%3Flid%3D41000000026936737%26amp%3Bpid%3DB001THFR8S /* if ($_GET['keys']=='products') { //echo $site['s_url']; //header("'".$site['s_url']."'"); header("Location:http://".$site['s_url']); } */ header("Location:http://".$site['s_url']); //sray ?>