6 The following requirements should be met prior to using 'XMLRPC for PHP':
8 . the php "curl" extension is needed if you wish to use SSL or HTTP 1.1 to
9 communicate with remote servers
11 The php "xmlrpc" native extension is not required, but if it is installed,
12 there will be no interference with the operation of this library.
15 Installation instructions
16 -------------------------
18 Installation of the library is quite easy:
20 1. Via Composer (highly recommended):
22 1. Install composer if you don't have it already present on your system.
23 Depending on how you install, you may end up with a composer.phar file in your directory.
24 In that case, no worries! Just substitute 'php composer.phar' for 'composer' in the commands below.
26 2. If you're creating a new project, create a new empty directory for it.
28 3. Open a terminal and use Composer to grab the library.
30 $ composer require phpxmlrpc/phpxmlrpc:4.0
33 Once Composer has downloaded the component(s), all you need to do is include the vendor/autoload.php file that
34 was generated by Composer. This file takes care of autoloading all of the libraries so that you can use them
35 immediately, including phpxmlrpc:
37 // File example: src/script.php
39 // update this to the path to the "vendor/" directory, relative to this file
40 require_once __DIR__.'/../vendor/autoload.php';
43 use PhpXmlRpc\Request;
46 $client = new Client('http://some/server');
47 $response = $client->send(new Request('method', array(new Value('parameter'))));
49 5. IMPORTANT! Make sure that the vendor/phpxmlrpc directory is not directly accessible from the internet,
50 as leaving it open to access means that any visitor can trigger execution of php code such as
51 the built-in debugger.
54 2. Via manual download and autoload configuration
56 1. copy the contents of the src/ folder to any location required by your
57 application (it can be inside the web server root or not).
59 2. configure your app autoloading mechanism so that all classes in the PhpXmlRpc namespace are loaded
60 from that location (any PSR-4 compliant autoloader can do that)
64 // File example: script.php
66 require_once __DIR__.'my_autoloader.php';
69 use PhpXmlRpc\Request;
72 $client = new Client('http://some/server');
73 $response = $client->send(new Request('method', array(new Value('parameter'))));
75 5. IMPORTANT! Make sure that the vendor/phpxmlrpc directory is not directly accessible from the internet,
76 as leaving it open to access means that any visitor can trigger execution of php code such as
77 the built-in debugger.
80 Please note that usage of the 'make' command for installation of the library is
81 not recommended, as it will generally involve editing of the makefile for a