Expression engine cms has a great features to put php code inside the template like other cms. It sometimes usefull because expression engine tags don’t cover many things like arithmetic operation or others. Sometimes it is needed also to use third party script in your template, it’s very easy to do that.
Let you have a captcha script captcha.php ( third part script although EE has built in captcha feature) you want to embed in your template. Just get that script, upload to root or any folder. Then go to your template, make that template to php enabled. Put the code similar as below –
//if the script is inside any folder, code will be like include “foldername/scriptname”
If there is any variable inside the third party script, that variable can be accessible directly from the template without define that as global. It’s really awesome!