PDA

View Full Version : Embed Content from another site



stitcho
14 Feb 2011, 10:15 AM
I am looking to see whether it is possible to embed specific content from one site into another. Ideally I want to stay away from iFrames and use PHP but if iFrames are the best or only option then so be it.

Ok so for example I have a table on website www.xyz.com but I want to display that table on website www.zyx.com. I dont want to embed the entire page, just the table. Is this possible?

Jason
14 Feb 2011, 04:03 PM
Yes its possible. You would need to extract the content with PHP which depending on the page could be quite complicated. You also need to have the right to republish the data from the original site. Pulling stuff off without permission breaks copyright laws and a DMCA request can soon pull your site offline.

Here are a few decent starting points to get you going.

http://www.electrictoolbox.com/extract-first-paragraph-webpage-php/
http://stackoverflow.com/questions/138313/how-to-extract-img-src-title-and-alt-from-html-using-php