Home > php教程 > PHP源码 > body text

Ripcord 编写 XML-RPC 实例

PHP中文网
Release: 2016-05-25 17:15:13
Original
1460 people have browsed it

Ripcord 编写 XML-RPC 实例

<?php
    require_once(&#39;ripcord.php&#39;);

    class myTest 
    {
        /**
         * Documentation for Foo.
         */
        public function Foo() 
        {
            return &#39;Bar&#39;;
        }
    }

    $server = ripcord::server( &#39;myTest&#39; );

    $server->run();
?>
Copy after login

2. 客户端

<?php
    require_once(&#39;ripcord.php&#39;);

    $client = ripcord::xmlrpcClient( &#39;http://www.moviemeter.nl/ws&#39; );

    $score = $client->film->getScore( &#39;e3dee9d19a8c3af7c92f9067d2945b59&#39;, 500 );
?>
Copy after login

    

 以上就是Ripcord 编写 XML-RPC 实例的内容,更多相关内容请关注PHP中文网(www.php.cn)!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template