I am trying to add my AdBrite ads on my PHProxy. Here is the code: $_url_form = '<div style="width:100%;margin:0;text-align:center;border-bottom:1px solid #333333;color:#000000;background-color:#F2F2F2;font-size:10px;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 type="text/javascript">' . 'var AdBrite_Title_Color = 'CC0000';' . 'var AdBrite_Text_Color = '000000';' . 'var AdBrite_Background_Color = 'F2F2F2';' . 'var AdBrite_Border_Color = '333333';' . 'var AdBrite_URL_Color = '003366';' . 'try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==''?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe='';var AdBrite_Referrer='';}' . '</script>' . '<span style="white-space:nowrap;"><script type="text/javascript">document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(' src="http://ads.adbrite.com/mb/text_group.php?sid=876205&zs=3732385f3930&ifr='+AdBrite_Iframe+'&ref='+AdBrite_Referrer+'" type="text/javascript">');document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));</script>' . '<a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=876205&afsid=1"><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard-w.gif" style="background-color:#333333;border:none;padding:0;margin:0;" alt="Your Ad Here" width="14" height="90" border="0" /></a></span>' . '<br />'; Code (markup): The problem is, the many instances of ' in the AdBrite code interferes with the .' ' offsetting the code in PHP and it terminates early and the ads won't show up. How can I fix this?
Try this, hope it works. $_url_form = '<div style="width:100%;margin:0;text-align:center;border-bottom:1px solid #333333;color:#000000;background-color:#F2F2F2;font-size:10px;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 type="text/javascript">' . 'var AdBrite_Title_Color=\'CC0000\';' . 'var AdBrite_Text_Color = \'000000\';' . 'var AdBrite_Background_Color = \'F2F2F2\';' . 'var AdBrite_Border_Color = \'333333\';' . 'var AdBrite_URL_Color = \'003366\';' . 'try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==\'\'?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe=\'\';var AdBrite_Referrer=\'\';}' . '</script>' . '<span style="white-space:nowrap;"><script type="text/javascript">document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(\'src="http://ads.adbrite.com/mb/text_group.php?sid=876205&zs=3732385f3930&ifr=\'+AdBrite_Iframe+\'&ref=\'+AdBrite_Referrer+\'" type="text/javascript">\');document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));</script>' . '<a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=876205&afsid=1"><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard-w.gif" style="background-color:#333333;border:none;padding:0;margin:0;" alt="Your Ad Here" width="14" height="90" border="0" /></a></span>' . '<br />'; PHP: