Puedes usar
Heredoc:
Código PHP:
Ver original$foo = <<<STR
<script type='text/javascript'><!--//<![CDATA[
var m3_u = (location.protocol=='https:'?'https://adserver.pymex.pe/www/delivery/ajs.php':'http://adserver.pymex.pe/www/delivery/ajs.php');
var m3_r = Math.floor(Math.random()*99999999999);
if (!document.MAX_used) document.MAX_used = ',';
document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
document.write ("?zoneid=18");
document.write ('&cb=' + m3_r);
if (document.MAX_used != ',') document.write ("&exclude=" + document.MAX_used);
document.write (document.charset ? '&charset='+document.charset : (document.characterSet ? '&charset='+document.characterSet : ''));
document.write ("&loc=" + escape(window.location));
if (document.referrer) document.write ("&referer=" + escape(document.referrer));
if (document.context) document.write ("&context=" + escape(document.context));
if (document.mmm_fo) document.write ("&mmm_fo=1");
document.write ("'><\/scr"+"ipt>");
//]]>--></script><noscript><a href='http://adserver.pymex.pe/www/delivery/ck.php?n=ad5685a2&cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://adserver.pymex.pe/www/delivery/avw.php?zoneid=18&cb=INSERT_RANDOM_NUMBER_HERE&n=ad5685a2' border='0' alt='' /></a></noscript>
STR;