How to retrieve data from parse?

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

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

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.