Mixing cold fusion headers and footers with PHP body

I am working on a PHP-based shopping cart that is integrated with a ColdFusion-rendered online catalog.  When the user is checking out their order, I have been asked to use the ColdFusion headers and footers (developed a long time ago) with the PHP-rendered body.  

Is this even possible?  Any hints would be greatly appreciated!


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
You could try putting the PHP page in an Iframe on the CF page.
use the ColdFusion headers and footers (developed a long time ago)

Headers/footers generally bring to mind something static.  What exactly do these header/footers do - in terms of CF code? If they're not dynamic, or user session specific, perhaps you could simply use the HTML generated by those scripts in your php instead.
danpmanAuthor Commented:
Thanks to everyone for your responses.  To answer _agx_'s question - the headers and footers are static - just links and menu options with some rollover effects.

How would I capture and use the HTML generated by those scripts?  Just render the header and footer and 'save-as' the resulting HTML?  Or call the CF script from the PHP code?

Much appreciated!

Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

Yes, "save as" is the quick and easy way.  If you had a lot of files I'd say use curl and save the generated html files programmatically, but for a single header and footer it's probably not worth it.

BTW, be warned, old CF code has a tendency to generate a lot of white space in the generated HTML. It won't hurt anything, but you may want to run them through a regex to reduce the .html file size.
Actually on second thought, ... you also need to check the generated HTML and be sure you grab any linked resources, like images, javascript and/or css files.  Since this sounds like a one time task, a single header and footer page could probably be done manually.  If it's more than that, or that something that's likely to change, I'd look into a programmatic way to grab the html, extract any links then grab the linked resources too.
Dave BaldwinFixer of ProblemsCommented:
I would generate a page with the header and the footer and a blank space in between, grab the 'View Source', and use that as the basis for the PHP page.  I've done that with other pages quite a number of times.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.