Im trying to enter an ad code onto a proxified page, have been working on it for about 3 hours and cant seem to get it, any help is appreciated. Here is the code <script language='javascript' type="text/javascript"> <!-- if (!document.phpAds_used) document.phpAds_used = ','; phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11); document.write ("<" + "script language='javascript' type='text/javascript' src='"); document.write ("http://www.claxonmedia.com/adserve_rot.php?n=" + phpAds_random); document.write ("&invoke=js"); document.write ("&type=banner"); document.write ("&aff="); document.write ("&exclude=" + document.phpAds_used); if (document.referer) document.write ("&referer=" + escape(document.referer)); document.write ("'><" + "/script>"); //--> </script><noscript><a href='http://www.claxonmedia.com/adclick.php?n=6034c6'><img src='http://www.claxonmedia.com/adserve_rot.php?n=6034c6&type=banner&aff=' border='0' alt=''></a></noscript> Anyone know how I can echo that so it actually displays??? Thanks all Dylan
It uses document.write() so it will echo the contents exactly where you put the script. Just put it somewhere in the <body> tag (assuming you already know how to edit the HTML of the proxified page)
I know where to put it, but I must be entering it wrong, I dont have much experience with javascript, Im a php guy, this is what I have entered. $_url_form = '<div style="width:100%;margin:0;text-align:center;border-bottom:1px solid #725554;color:#000000;background-color:#F2FDF3;font-size:12px;font-weight:bold;font-family:Bitstream Vera Sans,arial,sans-serif;padding:4px;">' . '<form method="post" action="' . $_script_url . '">' . ' <label for="____' . $_config['url_var_name'] . '"><a href="' . $_url . '">Address</a>:</label> <input id="____' . $_config['url_var_name'] . '" type="text" size="80" name="' . $_config['url_var_name'] . '" value="' . $_url . '" />' . ' <input type="submit" name="go" value="Go" />' . ' [go: <a href="' . $_script_url . '?' . $_config['url_var_name'] . '=' . encode_url($_url_parts['prev_dir']) .' ">up one dir</a>, <a href="' . $_script_base . '">main page</a>]' . '<br>' . '<script language=\'javascript\' type="text/javascript">' . '<!--' . ' if (!document.phpAds_used) document.phpAds_used = \',\';' . ' phpAds_random = new String (Math.random());' . ' phpAds_random = phpAds_random.substring(2,11);' . ' ' . ' document.write ("<" + "script language=\'javascript\' type=\'text/javascript\' src=\'");' . ' document.write ("http://www.claxonmedia.com/adserve_rot.php?n=" + phpAds_random);' . ' document.write ("&invoke=js");' . ' document.write ("&type=banner");' . ' document.write ("&aff=");' . ' document.write ("&exclude=" + document.phpAds_used);' . ' if (document.referer)' . ' document.write ("&referer=" + escape(document.referer));' . ' document.write ("\'><" + "/script>");' . '//-->' . '</script><noscript><a href=\'http://www.claxonmedia.com/adclick.php?n=6034c6\'><img src=\'http://www.claxonmedia.com/adserve_rot.php?n=6034c6&type=banner&aff=\' border=\'0\' alt=\'\'></a></noscript><br><hr>'; Code (markup): Is this wrong??? Thanks Dylan
Seems like a massive waste of code to me ..... <?php printf( '<script language="javascript"'. ' src="http://www.claxonmedia.com/adserve_rot.php?n=%s&invoke=js&type=banner%s">'. '</script>', rand( 0, 11 ), $_SERVER['HTTP_REFERER'] ? sprintf('&referer=%s', $_SERVER['HTTP_REFERER'] ) : '' ); ?> PHP:
Maybe because <!-- is on the same line as part of your JavaScript Add a "\n" to the end of it. i.e.: . '<!--' . "\n" Code (markup): krakjoe, the "waste of code" is to evade some primitive ad blockers.