How can I extract data of an external XML to PHP?

Get secure xml data using php?

  • Hi, i need to retrieve this data using php: https://secure.mollie.nl/xml/ideal?a=banklist&testmode=true How do i approach this?

  • Answer:

    If your problem is te XML, you can use the solution showed at http://php.net/manual/en/class.simplexmliterator.php (it is a function that even transforms the data into an array) If the problem is that the XML is secure (HTTPS) then you have to use cURL : $url='https://secure.mollie.nl/xml/ide… $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // Next line configures cURL to accept any server(peer) certificate. // This isn’t optimal from a security point of view curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $response = curl_exec($ch); curl_close($ch);

Ilyakar 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.