Home  >  Article  >  php教程  >  Ripcord 编写 XML-RPC 实例

Ripcord 编写 XML-RPC 实例

PHP中文网
PHP中文网Original
2016-05-25 17:15:131458browse

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();
?>

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 );
?>

    

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

Statement:
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