I have been trying for a while to get my referral URL for the Ad-network next to my Co-Op ads. Well after messing with the code for a while and a little help from a couple of friendly people on the forum I got it to work. Check it out HERE . It validates in the Co-op and http://validator.w3.org You will need to alter the blue code to fit your site/css and make sure to put your referral number in there, unless you want me to get it Here is the code. <?php if (!function_exists('file_get_contents')) { function file_get_contents($url) { $handle = fopen($url, 'r'); $string = fread($handle, 4096000); fclose($handle); return $string; } } include ('ad_network.php'); echo preg_replace ("/<\/body>/i", [COLOR=Red]'<[COLOR=Blue]DIV align="center" class="style30"[/COLOR]>'.'<a href="http://www.digitalpoint.com/tools/ad-network/?s=[COLOR=Blue]1905[/COLOR]" rel="nofollow">Sponsored Ads</a>'.'>>'[/COLOR] . $ad_network[0]. ' ' . $ad_network[1]. ' ' . $ad_network[2] . ' ' . $ad_network[3] . ' ' . $ad_network[4] . '</div></body>', file_get_contents(str_replace ('../', '', $_REQUEST['file']))); ?> Code (markup):
someone with an under 50 post count writing scripts for the community? good job - I'm sure this will be a relief for many.
He he... I hear you, Foxy... I have no idea either. Kyle, using the original coop code What would we need to change??
This would be if your running html site, it would be your passthru.php file. Your are running PHP so you wouldn't use that code. PHP would look like this: [COLOR=Blue]<p><font size="2%">Co-op affilliate links - <span class="style9"[/COLOR]> <?php ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../'); include ('ad_network.php');?> <?php echo $ad_network[0];?> - <?php echo $ad_network[1];?> - <?php echo $ad_network[2];?> - <?php echo $ad_network[3];?> - <?php echo $ad_network[4];?> [COLOR=Blue]</span></font></p>[/COLOR] Code (markup):