How to parse data from another website?
-
i have a project in which i want to access the data of any other website and use it in my website. i want to parse the data from that website. the owner of provider site doesnt need to know about this since i want to access the publically available data. how do i do it? plz help...
-
Answer:
It depends on the website. If it uses a CMS like WordPress, you can access the data in XML format via an XMP-RPC. If it's a popular website like Wikipedia or Flickr, it may well have an API which can return the data for you in one of several formats (e.g. http://en.wikipedia.org/w/api.php ). XML and other formatted data can be easily parsed by PHP etc. If none of those options are available, you can try writing a function to parse the data yourself. You can use the PHP DOM (http://docs.php.net/manual/en/book.dom.php ) extension to parse an HTML document into an object, after which the data can be accessed in a similar way to the Javascript document object. Be aware that with this method your script would be likely to break if the layout of the page you were accessing changed. To get the data in the first place you can use CURL, which is standard in most PHP builds. T.
anant at Yahoo! Answers Visit the source
Related Q & A:
- How to extract data from any website?Best solution by Stack Overflow
- How to insert data from one table to another?Best solution by Stack Overflow
- How can I query Parse data by creation date with Swift?Best solution by Stack Overflow
- How to scrape data from a website?Best solution by Stack Overflow
- How to refresh data using parse and swift?Best solution by Stack Overflow
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.