Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can we get data from others website

Status
Not open for further replies.

wolf73

Programmer
Feb 12, 2006
93
CA
Hi,

I don't know if it is possible or not. i been told you can write a php code that will go to some other website. get data from there and dispplay in on your site. Like if some one selling DVD , you get all the data from there website, with out hiting there database and then display in on your website? Can we do that? I been told it works like search engines spider works.
 
It's often called "scraping". You grab the page source, sort out the data you want, and then plug it into your site. You need to see what the format of the data on the other page is to figure out how to filter out what you want, and that needs to be changed if there are any significant format changes to the web page you're reading.

Lee
 
is it possible to get code for that kind a functionality? I bet it will be extremly complicated to write such a code. Like I have no clue how it is even possible ....
 
I bet you didn't do a search on Google, did you? The last time I wanted to do that kind of thing, I had a LOT of good info from just doing a search.

As well, the PHP documentation has examples for most of what you want, too. Just RTFM.

Lee
 
get content by this:

Code:
$url = "[URL unfurl="true"]http://www.web.com/index.php";[/URL]
$content = readfile ($url);

parse it in the normal way.

BUT be aware - you are taking data from another person's site. sometimes this is permitted and/or encouraged. most of the time site owners want their content to be viewed on their site in the way they intended. unless the site explicitly permits scraping my view (as a solicitor and site owner) is that it is a fair assumption that you will not be licensed to copy the content through scraping. for borderline cases you could examine the robots.txt files to ascertain the site-owners general view towards off-site viewing/copying.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top