Error establishing a database connection - please contact the webhost"); } include_once($_SERVER['DOCUMENT_ROOT'] . '/202-config/connect.php'); /* OK FIRST IF THERE IS NO PUBLIC CLICK_ID, JUST REDIRECT TO THE NORMAL CAMPAIGN */ if (!$_GET['pci']) { $mysql['aff_campaign_id_public'] = mysql_real_escape_string($acip); $aff_campaign_sql = "SELECT aff_campaign_rotate, aff_campaign_url, aff_campaign_url_2, aff_campaign_url_3, aff_campaign_url_4, aff_campaign_url_5, aff_campaign_name, aff_campaign_cloaking FROM 202_aff_campaigns WHERE aff_campaign_id_public='".$mysql['aff_campaign_id_public']."'"; $aff_campaign_row = memcache_mysql_fetch_assoc($aff_campaign_sql); if (empty($aff_campaign_row['aff_campaign_url'])) { die(); } //if there is no aff_url to redirect to DIEEEEEE!!!!!!! EEEEEE!!! #cache the results if ( is_writable(dirname(__FILE__) . '/cached' )) { #if the file does not exist create it if (!file_exists($myFile)) { $handle = @fopen($myFile, 'w'); @fclose($handle); } # now save this link to the $handle = @fopen($myFile, 'r'); $writeNewIndex = true; while (($row = @fgetcsv($handle, 100000, ",")) and ($writeNewIndex == true)) { if ($row[0] == $acip) $writeNewIndex = false; } @fclose($handle); if ($writeNewIndex) { //write this index to the txt file $newLine = "$acip, {$aff_campaign_row['aff_campaign_url']} \n"; $newHandle = @fopen($myFile, 'a+'); @fwrite($newHandle, $newLine); @fclose($newHandle); } } $url = rotateTrackerUrl($aff_campaign_row); //ok if there is a url that exists, if redirect php style, or if its cloaked, redirect meta refresh style. if ($aff_campaign_row['aff_campaign_cloaking'] == 0) { //cloaking OFF, so do a php header redirect header('location: '.$url); } else { //modify the redirect site url to go through another cloaked link $redirect_site_url = $url; ## Edited to fix host Gator $redirect_site_url = str_replace('http', '', $redirect_site_url); //cloaking ON, so do a meta REFRESH $html['aff_campaign_name'] = $aff_campaign_row['aff_campaign_name']; ?> <? echo $html['aff_campaign_name']; ?>
You are being automatically redirected to .

Page Stuck? Click Here.
<? echo $html['aff_campaign_name']; ?>
You are being automatically redirected to .

Page Stuck? Click Here.