Skip to main content
Known Participant
September 11, 2007
Question

including headers and footers from other websites

  • September 11, 2007
  • 2 replies
  • 386 views
Is there away to include a header or a template from a total different website?

I know this will not work just using the follow code as an example
<cfinclude template=" http://www.website.com/header.html">
This topic has been closed for replies.

2 replies

Inspiring
September 11, 2007
That will of course grab the whole page. You will then have to parse the content for what you need.

Of course I wonder why you would want to grab the header or the template from another website. If the website belongs to you then you don't need to swipe it. Be very careful about going after other peoples' sites like this. You have to have permission.
September 11, 2007
You don't need CFINCLUDE - CFHTTP will do the job just fine. Snip the following and run it.