Miscellaneous
  Home arrow Miscellaneous arrow Page 6 - Remote Procedure Calls with PEAR::XML-...
Codewalker Forums 
  Tutorials  
Database Articles  
Miscellaneous  
Navigation Usability  
PEAR Articles  
Programming Basics  
Server Administration  
XML Tutorials  
  Reviews  
Database Book Reviews  
Linux Book Reviews  
Miscellaneous Reviews  
PHP Book Reviews  
PHP Software Reviews  
Server Admin Reviews  
SQL Tool Reviews  
  Code Gallery  
Content Management Code  
Contest Code  
Counters Code  
Database Code  
Date Time Code  
Discussion Board Code  
Email Code  
File Manipulation Code  
GUI Code  
Link Farm Code  
Miscellaneous Code  
Search Code  
Site Navigation Code  
User Management Code  
Mobile Linux 
Case Studies 
iPad Development 
Download TestComplete 
Forums Sitemap 
Weekly Newsletter 
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MISCELLANEOUS

Remote Procedure Calls with PEAR::XML-RPC
By: bluephoenix
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 3
    2004-01-29

    Table of Contents:
  • Remote Procedure Calls with PEAR::XML-RPC
  • The Example Script
  • An XML_RPC Exchange
  • Client Rewritten Example
  • Client Sending
  • Client Receiving
  • Server Rewritten Example
  • Distributed Function Requirements
  • Inside the Function
  • Map and Send
  • The Output
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Remote Procedure Calls with PEAR::XML-RPC - Client Receiving


    (Page 6 of 12 )

    A value object is extracted from the response by the response object's value method. For scalar values, the value's type can then be extracted with scalartype and the value extracted with scalarval.

    <?php
    $value 
    $result-&gt;value();
    $number $value-&gt;scalarval();
    ?>

    Again, serialize can be used to view the message and response XML.

    <?php
    echo "&lt;p&gt;&lt;b&gt;Return Value:&lt;/b&gt; $number &lt;/p&gt;";
    echo 
    "&lt;p&gt;&lt;b&gt;Received XML Message:&lt;/b&gt;";
    echo 
    "&lt;pre&gt;" htmlentities($result-&gt;serialize()) . "&lt;/pre&gt;&lt;/p&gt;";

    echo 
    "&lt;p&gt;$first $last's name is $number letters long.&lt;/p&gt;";
    ?>

    The arraymem and structmem methods are used to extract a specified array or structure member. For example:

    <?php
    $value 
    $result-&gt;arraymem($n);
    $value $result-&gt;structmem($memberName);
    ?>

    The arraymem method returns element $n of $result as a value object. The structmem method returns $memberName of $result as a value object.

    More Miscellaneous Articles
    More By bluephoenix


       · I am Sobhan Palpal_sobhan@hotmail.comenjoy php!!live and let...
       · f
       · kk
     

    MISCELLANEOUS ARTICLES

    - Firefox 3.6.6 Released with Improved Plug-in...
    - Attention Bloggers: WordPress 3.0 Now Releas...
    - Reflection in PHP 5
    - Inheritance and Other Advanced OOP Features
    - Advanced OOP Features
    - Linux from Scratch V.6.6 Review
    - Linux Gaining in Strength
    - Install Slackware on Your Old PC
    - Firefox Plugins You`re Not Using (and Should...
    - Working with MP3 ID3 Tags in FTP Server Usin...
    - How Switching to Linux Can Make Your Computi...
    - Set Up Your Home Office on Linux: a Guide fo...
    - Putty File Transfer Commands in SSH Protocol
    - Setting Up Ubuntu for Your Home Office
    - Installing Mint Linux





    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek