you have to REPLACE "your code here" with your own code, not write it somewhere else!
Since I don't know what kind of code you want to place here it is hard to tell.
If the code produces some Output, set the output into a variable (replace echo if there is echo) and put the variable of the output into "$external_php_code".
If you have not the minimum PHP knowledge this is not so easy, I know.
If everything fails, post the PHP code you want to use