After a user signs up to receive newsletters (using the profile coming from CiviCRM/CiviMail), they receive a confirmation email. Upon clicking on the confirmation link in that email, they are taken to a Confirmation page which says that they have successfully been subscribed to the X mailing list. The content of that Confirmation page comes from the /civicrm/templates/CRM/Mailing/Page/Confirm.tpl.
What I need to do is one of the following. Either of these options would work for me:
1) Run php code in the Confirm.tpl file. This would allow me to dynamically load some additional content and present it to the user. I'm not sure about the possibility of this because I know inserting php in Smarty has been deprecated.
2) Redirect to a separate page and present to the user that page instead of the content coming from Confirm.tpl. In that separate page I would then be able to run my php and load content dynamically.
I am running Wordpress 4.4 and CiviCRM 4.6.8.