Welcome Guest, Not a member yet? Register   Sign In
Xmlrpc with & character issue
#1

[eluser]Unknown[/eluser]
Hai all

I have one issue with codeignitor Xmlrpc with '&' character.That is every & character one semicolon(Wink is adding to the content.

client side code

<?php

class xmlrpcclient extends Controller {

function index()
{
$this->load->helper('url');


$this->load->library('xmlrpc');

$this->xmlrpc->server( 'http://192.168.10.25/bin/sample/index.php/xmlrpcserver/index', 80);
$this->xmlrpc->method('Greetings');

$request = array('How is ⁢going?');
$this->xmlrpc->request($request);

if ( ! $this->xmlrpc->send_request())
{
echo $this->xmlrpc->display_error();
}
else
{
echo '<pre>';
print_r($this->xmlrpc->display_response());
echo '</pre>';
}
}
}
?&gt;


server side code


&lt;?php

class xmlrpcserver extends Controller {

function index()
{
$this->load->library('xmlrpc');
$this->load->library('xmlrpcs');

$config['functions']['Greetings'] = array('function' => 'xmlrpcserver.process');

$this->xmlrpcs->initialize($config);
$this->xmlrpcs->serve();
}


function process($request)
{
$parameters = $request->output_parameters();

$response = array(
array(
'you_said' => $parameters['0'],
'i_respond' => 'Not bad at all.'),
'struct');

return $this->xmlrpc->send_response($response);
}
}
?&gt;

I got the result is bellow

Array
(
[you_said] => How is &it; going?
[i_respond] => Not bad at all.
)

but expect output will be

Array
(
[you_said] => How is &it;going?
[i_respond] => Not bad at all.
)


what is problem with the code?


thank you




Theme © iAndrew 2016 - Forum software by © MyBB