7 The following requirements should be met prior to using 'XMLRPC for PHP':
11 * the php "curl" extension is needed if you wish to use SSL or HTTP 1.1 to
12 communicate with remote servers
14 The php "xmlrpc" native extension is not required, but if it is installed,
15 there will be no interference with the operation of this library.
18 Installation instructions
19 -------------------------
21 Installation of the library is quite easy:
23 1. Via Composer (highly recommended):
25 1. Install composer if you don't have it already present on your system.
26 Depending on how you install, you may end up with a composer.phar file in your directory.
27 In that case, no worries! Just substitute 'php composer.phar' for 'composer' in the commands below.
29 2. If you're creating a new project, create a new empty directory for it.
31 3. Open a terminal and use Composer to grab the library.
33 $ composer require phpxmlrpc/phpxmlrpc:4.0
36 Once Composer has downloaded the component(s), all you need to do is include the vendor/autoload.php file that
37 was generated by Composer. This file takes care of autoloading all of the libraries so that you can use them
38 immediately, including phpxmlrpc:
40 // File example: src/script.php
42 // update this to the path to the "vendor/" directory, relative to this file
43 require_once __DIR__.'/../vendor/autoload.php';
46 use PhpXmlRpc\Request;
49 $client = new Client('http://some/server');
50 $response = $client->send(new Request('method', array(new Value('parameter'))));
52 5. IMPORTANT! Make sure that the vendor/phpxmlrpc directory is not directly accessible from the internet,
53 as leaving it open to access means that any visitor can trigger execution of php code such as
54 the built-in debugger.
57 2. Via manual download and autoload configuration
59 1. copy the contents of the src/ folder to any location required by your
60 application (it can be inside the web server root or not).
62 2. configure your app autoloading mechanism so that all classes in the PhpXmlRpc namespace are loaded
63 from that location: any PSR-4 compliant autoloader can do that, if you don't have any there is one
64 available in src/Autoloader.php
68 // File example: script.php
70 require_once __DIR__.'my_autoloader.php';
73 use PhpXmlRpc\Request;
76 $client = new Client('http://some/server');
77 $response = $client->send(new Request('method', array(new Value('parameter'))));
79 5. IMPORTANT! Make sure that the vendor/phpxmlrpc directory is not directly accessible from the internet,
80 as leaving it open to access means that any visitor can trigger execution of php code such as
81 the built-in debugger.
86 Please note that usage of the 'pake' command is not required for installation of the library.
87 At this moment it is only useful to build the html and pdf versions of the documentation, and the tarballs
88 for distribution of the library.