PHP code example of artistan / revive-xmlrpc

1. Go to this page and download the library: Download artistan/revive-xmlrpc library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

artistan / revive-xmlrpc example snippets


use Artistan\ReviveXmlRpc\OpenAdsV2ApiXmlRpc;
$rpc = new OpenAdsV2ApiXmlRpc();
$list = $rpc->getAgencyList();

use Artistan\ReviveXmlRpc\OpenAdsV2ApiXmlRpc;

$config = [
	'host'=>'ads.me.com', 
	'basepath'=>'/www/api/v2/xmlrpc/',
	'username'=>'admin', 
	'password'=>'~test~', 
	'port'=>0, 
	'ssl'=>true, 
	'timeout'=>15
]


$rpc = new OpenAdsV2ApiXmlRpc($config);
$list = $rpc->getAgencyList();

use Artistan\ReviveXmlRpc\OpenAdsV2ApiXmlRpc;
$rpc = new OpenAdsV2ApiXmlRpc('ads.me.com', '/www/api/v2/xmlrpc/', 'admin', '~test~', 0, true, 15);
$list = $rpc->getAgencyList();

use Artistan\ReviveXmlRpc\OpenAdsV1ApiXmlRpc;
$rpc = new OpenAdsV1ApiXmlRpc('ads.me.com', '/www/api/v1/xmlrpc/', 'admin', '~test~', 0, true, 15);
$list = $rpc->getAgencyList();

        $rpc = new OpenAdsDisplayXmlRpc('ads.me.com', '/www/delivery/axmlrpc.php', 443, true, 15);
        $rpc->setRemoteInfo('remote_addr', 'chuck-dev');
        $list = $rpc->view(
        	/* string    zone */ 'zone:1', 
        	/* int campaignid */ 0, 
        	/* string  target */ '', 
        	/* string  source */ '', 
        	/* 0|1   withText */ 0, 
        	/* array  contect */ [], 
        	/* strubg charset */ ''
		);
        var_dump(json_decode(json_encode($list),true));
bash
php artisan vendor:publish --provider=artistan/revive-xmlrpc