views:

14

answers:

1

How does PHP's function xmlrpc_encode_request() work?

Does it need the value of allow_url_fopen set to true?

Well, you access external URLs with this function, so does it need this configuration? I can't test it myself at the moment, unfortunately.

Thanks in advance!

+1  A: 

No, it does not. This function is just for marshalling the requested function name and its parameters. It builds an XML string. Therefore it does not need to retrieve external URLs itself.

So this function in itself is not particular useful. Later on you will need to send the XML-encoded RPC request over an HTTP stream. And in this step 2, you need either allow_url_fopen, the curl extension, or the pecl http functions. Most XML-RPC libraries however provide a means to transmit the RPC request in HTTP via PHPs native socket functions.

So in essence, allow_url_fopen is not required.

mario
Thanks, now I see my question wasn't well described. But you answered everything I wanted too know - so: Thank you very much, mario! :)