poef / ripcord Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/ripcord
Automatically exported from code.google.com/p/ripcord
Readme Ripcord: Easy XML-RPC Client and Server for PHP 5 ============================================================================= Ripcord is a very easy to use XML-RPC library for PHP. It provides client, server and auto documentation features for XML-RPC but also SimpleRPC and simplified SOAP (1.1). It uses PHP's xmlrpc library and it needs at least PHP 5. To create a simple xmlrpc client do something like this: <?php require_once('ripcord.php'); $client = ripcord::xmlrpcClient( 'http://www.moviemeter.nl/ws' ); $score = $client->film->getScore( 'e3dee9d19a8c3af7c92f9067d2945b59', 500 ); ?> See the RipcordClientManual <http://code.google.com/p/ripcord/wiki/RipcordClientManual> for more information. To create a simple xmlrpc server do something like this: <?php require_once('ripcord.php'); class myTest { public function Foo() { return 'Bar'; } } $test = new MyTest(); $server = ripcord::server( $test ); $server->run(); ?> See the RipcordServerManual <http://code.google.com/p/ripcord/wiki/RipcordServerManual> for more information. Extending Ripcord ================= Ripcord is also very simple to extend. All functionality can be changed through dependency injection. The client by default uses the PHP Streams API to connect to a server, but can simply be reconfigured to use CURL. You can provide your own configuration or even a completely new transport method by simply injecting a new transport object into the client. Any server created with Ripcord is auto documenting by default. Simply browse to the URL of your RPC server and you will see a list of all methods including any inline documentation for that method, if you use docblock style comments, e.g.: /** * This will show up with your method description. */ function yourMethod() { } The auto documentor is again easily extended to use your own styles or extensions and you can simply inject a completely different documentor object into the server if you want. Or skip it altogether. Documentation ============= The full API documentation is included in the docs/ directory.
In the file ricord_client.php line 229 - xmlrpc_decode doesn't have the encoding parameter set correctly. Due to that strings are decoded into ISO-8859-1 and not UTF-8 (as that seems to be the default behavior for that function as documented in PHP Doc).
Suggested fix:
$result = xmlrpc_decode( $response , (array_key_exists('encoding', $this->_outputOptions)) ? $this->_outputOptions['encoding'] : null);
I was having a problem with all of my server side methods being called twice. I
tracked it down to the "run" method in ripcord_server.php. The problematic bit
is
[code]
header('Content-type: text/xml');
header('Access-Control-Allow-Origin: *');
header("Content-Length: ".strlen($this->handle( $request_xml )));
echo $this->handle( $request_xml );
[/code]
I changed it to
[code]
$handledXml = $this->handle($requestXml);
header('Content-type: text/xml');
header('Access-Control-Allow-Origin: *');
header("Content-Length: ".strlen(handledXml));
echo handledXml;
[/code]
Perhaps I was doing something wrong but it fixed my problem.
Original issue reported on code.google.com by [email protected]
on 9 Dec 2012 at 7:25
Hello, it appears this project is no longer active but I would like to confirm.
I own the ripcord.io domain name and github.com/RipcordIO org and was planning
on using it for an RPC/IPC library but then was made aware of this project.
I would like to ensure I'm not doing hard if I proceed with using the Ripcord
IO name.
Original issue reported on code.google.com by [email protected]
on 16 Dec 2014 at 11:21
In documentation I see:
$client = ripcord::xmlrpcClient( $url, null, $transport );
but in ripcord.php at line 192
public static function xmlrpcClient($url, $options = null)
{
$options['version'] = 'xmlrpc';
return self::client($url, $options);
}
I don't see param $transport in function xmlrpcClient. Maybe it should be
public static function xmlrpcClient($url, $options = null, $transport = null)
{
$options['version'] = 'xmlrpc';
return self::client($url, $options, $transport);
}
?
Original issue reported on code.google.com by [email protected]
on 7 Mar 2011 at 11:23
Do we know which modules in PHP are needed to run this library?
Hello,
Google is planning to close google project hub
(http://www.fiercedevops.com/story/google-plans-closure-google-code-project-host
ing-site/2015-03-17).
Are you going to move to Github?
Original issue reported on code.google.com by [email protected]
on 24 Jun 2015 at 7:31
"It uses PHP's xmlrpc library and it needs at least PHP 5.".
Should I understand 5 and more .. or 5.X only ?
What steps will reproduce the problem?
1. While including RipCode the error is coming
Original issue reported on code.google.com by [email protected]
on 3 Dec 2010 at 8:01
I'm using ripcord to connect php to odoo server via webservice api. The library
is working perfectly in local, but in server is not working and is getting a
lot of time to work.
Any idea if it's modules php or other thing?
Original issue reported on code.google.com by [email protected]
on 15 Jun 2015 at 10:24
hai..
thank you so much for build ripcord,
very very nice..
owh ya, i have a problem with https url..
in my project, i've change the method post on Ripcord_Transport_Stream
implements Ripcord_Transport..
to: (see attachment)
this is just my suggestion :-)
once again.. thank you very much for ripcord.
Original issue reported on code.google.com by mr.ryansilalahi
on 13 Aug 2012 at 5:18
Attachments:
Hi,
I'm using ripcord to get data from Odoo. When sending some request to Odoo, I get the response in ASCII charset, but the request was defined as UTF-8.
In file ripcord_client.php
on line 229, there is missing a second parameter for xmlrpc_decode()
.
Instead of
$result = xmlrpc_decode( $response );
there should be something like this
$result = xmlrpc_decode( $response, $this->_outputOptions['encoding'] );
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.