Forum Moderators: coopster
I'm designing a website where the company has a couple of catalogs which are provided by external vendors. For example,
www.example.com
provides a place for customers to browse for blank goods. It's not really an e-commerce site, but it's designed to be generic. I want it to appear within the menu/layout of the main site.
I have a couple of "low-tech" options - place it in a frameset, maybe with a banner up top just to remind the user where they came from and allow easy navigation back to the rest of the site. But this doesn't allow me to keep much of the "look and feel" of the rest of the site, which is built around a .css style sheet with a 3-column layout. I'd like to keep this content in the center column.
Or of course I could just spawn a new browser window and have this content be separate from the rest of the site. But of course that's even worse in terms of interconnection with the rest of the site.
I've seen a site that grabbed another site's content and kept it inside a section of the main site's page, but I can't remember where I saw it and I don't know if they were doing it with php, Java, or what.
I figured out how to put the page inside the main page with a php include, but of course whenever you click on a link inside this area, you just end up going wherever the link sent you and the content from the other columns is not preserved.
[edited by: coopster at 8:40 pm (utc) on Sep. 30, 2004]
[edit reason] generalized url per TOS [webmasterworld.com] [/edit]
To do screenscraping, you'll want to study file_get_contents() and str_replace(); if str_replace doesn't do it, then study preg_replace() and preg_replace_all(). These last two are a bit more complicated but very powerful when manipulating stings.
And I will ask the vendors in question about an XML feed, as I'm on a little more familiar ground there, but due to the nature of the sites, I may be out of luck.
Note to the mods - sorry, didn't think about my URL. No plugging of my wares intended.