Hey gang. I've updated passthru.php to read as the following: <?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 ", '<br><table width="800" cellpadding="0" cellspacing="0" border="0"><tr><td align="center"><font face="verdana" size="1"> Connections: ' . $ad_network . ' | ' . $ad_network . ' | ' . $ad_network .' | '. $ad_network . ' | ' . $ad_network . '</font>' . '</td>' . '</tr><tr><td align="center"><font face="verdana" size="1"><a href="http://www.digitalpoint.com/tools/ad-network/?s=1103" target="_new">Digital Point</a></font></td></tr>' . '</table>' . '<br>' . '</body>', file_get_contents(str_replace ('../', '', $_REQUEST['file']))); ?> But the ads don't work. All I get is the word "Array", not a link. See the example on our website: www.sedonamonthly.com Any ideas what could be wrong Thanks in advance. Matt
matt you might want to change this echo preg_replace ("/<\/body>/i ", '<br><table width="800" cellpadding="0" cellspacing="0" border="0"><tr><td align="center"><font face="verdana" size="1"> Connections: ' . $ad_network . ' | ' . $ad_network . ' | ' . $ad_network .' | '. $ad_network . ' | ' . $ad_network . '</font>' . '</td>' . '</tr><tr><td align="center"><font face="verdana" size="1"><a href="http://www.digitalpoint.com/tools/ad-network/?s=1103" target="_new">Digital Point</a></font></td></tr>' . '</table>' . '<br>' . '</body>', file_get_contents(str_replace ('../', '', $_REQUEST['file']))); Code (markup): to this: echo preg_replace ("/<\/body>/i ", '<br><table width="800" cellpadding="0" cellspacing="0" border="0"><tr><td align="center"><font face="verdana" size="1"> Connections: ' . $ad_network . '</font>' . '</td>' . '</tr><tr><td align="center"><font face="verdana" size="1"><a href="http://www.digitalpoint.com/tools/ad-network/?s=1103" target="_new">Digital Point</a></font></td></tr>' . '</table>' . '<br>' . '</body>', file_get_contents(str_replace ('../', '', $_REQUEST['file']))); Code (markup): That way it'll display different ads instead of the same ad like it's doing now.
Hey thanks for the help Your solution worked, but now it's just displaying one link. I'm not a PHP guy so I can't really think out the solution. Any ideas? Thanks again for your help. Matt