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 communicate with remote servers
13 The php "xmlrpc" native extension is not required, but if it is installed, there will be no interference with the
14 operation of this library.
17 Installation instructions
18 -------------------------
20 Installation of the library is quite easy:
22 1. Via Composer (highly recommended):
24 1. Install composer if you don't have it already present on your system.
25 Depending on how you install, you may end up with a composer.phar file in your directory.
26 In that case, no worries! Just substitute 'php composer.phar' for 'composer' in the commands below.
28 2. If you're creating a new project, create a new empty directory for it.
30 3. Open a terminal and use Composer to grab the library.
32 $ composer require phpxmlrpc/phpxmlrpc:^4
35 Once Composer has downloaded the component(s), all you need to do is include the vendor/autoload.php file that
36 was generated by Composer. This file takes care of autoloading all of the libraries so that you can use them
37 immediately, including phpxmlrpc:
39 // File example: src/script.php
41 // update this to the path to the "vendor/" directory, relative to this file
42 require_once __DIR__.'/../vendor/autoload.php';
45 use PhpXmlRpc\Request;
48 $client = new Client('http://some/server');
49 $response = $client->send(new Request('method', array(new Value('parameter'))));
51 5. IMPORTANT! Make sure that the vendor/phpxmlrpc directory is not directly accessible from the internet,
52 as leaving it open to access means that any visitor can trigger execution of php code such as
53 the built-in debugger.
56 2. Via manual download and autoload configuration
58 1. copy the contents of the src/ folder to any location required by your
59 application (it can be inside the web server root or not).
61 2. configure your app autoloading mechanism so that all classes in the PhpXmlRpc namespace are loaded
62 from that location: any PSR-4 compliant autoloader can do that, if you don't have any there is one
63 available in src/Autoloader.php
67 // File example: script.php
69 require_once __DIR__.'my_autoloader.php';
72 use PhpXmlRpc\Request;
75 $client = new Client('http://some/server');
76 $response = $client->send(new Request('method', array(new Value('parameter'))));
78 5. IMPORTANT! Make sure that the vendor/phpxmlrpc directory is not directly accessible from the internet,
79 as leaving it open to access means that any visitor can trigger execution of php code such as
80 the built-in debugger.
85 Please note that usage of the 'pake' command is not required for installation of the library.
86 At this moment it is only useful to build the html and pdf versions of the documentation, and the tarballs
87 for distribution of the library.