Dears, how to get div or content informations text and pictures from another website and show in my webpage?
Please help!

Recommended Answers

All 4 Replies

One way is to screenscape, but in my opinion that's not very ethical unless you have consent. Another method is to pull in data via a Feed (RSS for example) or an API.

What is the overall goal?

Member Avatar for diafol

Agree 100% with JorgeM. Scraping other people's stuff is just theft unless you have consent, and you shouldn't do it. In addition, scaping sites has its downsides too - you are totally at the mercy of the site owner as to whether you s/he will continue to maintain the data in the same format or even at all.

An API is far friendlier. One word about file_get_contents - it may not always be available on your host as some disable it. In this case you need to use cURL.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.