Above the script language=javascript, put:
?>
Then below the "</SCRIPT>", put:
<?php
It appears like it is messing up because you're using single quotes inside the javascript. You could also escape the single quotes inside the javascript with: \'
So your code:
Code:
document.writeln("<SCR"+"IPT language=\'Javascript\' src='http://server.cpmstar.com/view.aspx?poolid="+cpmstar_pid+"&script=1&rnd="+cpmstar_rnd+"'></SCR"+"IPT>");
Do whatever you feel is easier and less confusing. The above code should work, assuming that everything I stated about the code is correct.