Hello, I’d like to know how I can duplicate a field/content from another website.
Example, http://l2.hopzone.net/lineage2/details/99328/RedemptionL2
From the above website to “get” the votes and echo them on my php file.
Thank you, Gus
Hello, I’d like to know how I can duplicate a field/content from another website.
Example, http://l2.hopzone.net/lineage2/details/99328/RedemptionL2
From the above website to “get” the votes and echo them on my php file.
Thank you, Gus
Well, that is a loaded question. First, it can be done. But, I reviewed the site’s rules and was not clear
if it is legal to copy that information. Basically, they have a four year old copyright, but, do not say if that
data falls inside that copyright. Most likely to be completely legal, you would have to contact them and get
permission to use that data.
Next, comes the fun part. It can be done. Several steps are needed. You have the URL already.
1 - You write some simple, just a few lines, of PHP code to grab the that entire page of the site.
2 - Use either XML to strip out that section or just use some tricky code to strip out that section.
3 - Save the stripped out section somewhere on your site customizing it to look as you wish.
4 - Display the saved section on your site.
This process is called “scraping” a site. It is common and legal. You are not allowed to scrape sites
if they have notices and copyrights that say they do not want you to. Remember, you can only pull
what you can see. You will never get their PHP code this way. But, if they have JS or Jquery code in
the client-side of the page, you will be able to view it. It is not legal to steal that code for yourself.
You didn’t write it and you were not given it. I want to be clear legally so you understand that.
So, how do you do it? Normally I would send you to several places to understand how each part is done.
But, I found this tutorial which was very complete and I think you can follow it. Hope it helps and hope it
explains it enough for you to accomplish your project. Good luck…
Wait, actually, you should use the “Simple_HTML_dom” library. It is easier. It requires adding a library to
your PHP site, but, it’s easy, just an include of a small download. (Free) You have to look at the page you
posted and locate where that section is. You can easier do that by just RIGHT-CLICKing on the page and
selecting VIEW-SOURCE. Then, you see the source and move down till you get to that display area. Then
read this tutorial on how to use the library and you should figure it all out. Post back when you have any
issues and please post the code areas so we can follow you. Good luck!
http://code.tutsplus.com/tutorials/html-parsing-and-screen-scraping-with-the-simple-html-dom-library–net-11856
It is possible to duplicate the content but you need to ask permission first from the website owner because of copyright issues.
thinksnip, did you read my comments? I said that.
Again, as I said, you need to read all of the legal notes on each site you take data from and if it is not
100% clear on what they allow to be copied, you must ask permission from them and get it in writing
to make sure you are covered legally.