We are a wholesaler and have built an online catalog of our products. Some of our smaller customers would like to be able to do a live feed of our catalog right into their existing site.
I know one method is for them to use an iframe to accomplish this. I’m wondering if that is the best practice or if anyone has any better suggestions?
<iframe> is not a great idea, there are all sorts of accessibility and usability problems.
A better plan is to use ‘includes’. Your customers can then either use SSI or PHP to pull the file into the page. You need to save the file fragment (eg as .htm), just the actual content, not the <head> or anything like that. Then when it is included into a customer’s page, it becomes part of their page, obeying their stylesheet and everything.
Not getting it to work, but I have a question from your tutorial you linked me to. You commented that “You can only include pages on the same server”.
That is not what I’m wanting to do though. We have a catalog web site built. Some of our customers want to feed our catalog site into their site. Our customers are all over, so who knows who is hosting them and what servers they are on.
I’m pretty sure that, by using PHP, you can include stuff from other servers. The problem there is that I have no idea how, because I’ve never needed to learn. The best thing to do is to drop in on our PHP forum and ask your question to the nice folks in there.
Yes, PHP can include files from other servers (unlike SSI) and is far more powerful than SSI and you can only use one or the other on a page not both at the same time. Unless your webhost doesn’t support PHP, I’d personally go with PHP for simple includes. Though by the sounds of things you are also wanting something more complex that most likely requires database integration.
All I want for our customers to feed our entire catalog site into their own site. I have some iframing it and it works, but you and I know it could be better.
Thanks for the lead, I’ll take my quest over to the PHP section.