Miscellaneous
  Home arrow Miscellaneous arrow Page 6 - Remote Procedure Calls with PEAR::XML-RPC
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  
Forums Sitemap 
Dedicated Servers  
Download TestComplete 
JMSL Numerical Library 
IBM® developerWorks
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

    - Stopping CSRF Attacks in Your PHP Applicatio...
    - Quick and Dirty AJAX Tutorial
    - Flickr Puzzle Mashup
    - The PAVISE of Security
    - Creating a CAPTCHA with PHP
    - Sending SMS Thru HTTP
    - The Postal Fix - Part 2
    - Adding Mail with Exim
    - The Postal Fix - Part 1
    - Create Your Own Custom API
    - Adding Drop Shadows with PHP
    - Writing a Basic Authentication System in PHP
    - Overlapping Images with GD
    - Using Sockets in PHP
    - Dynamic CSS with PHP






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway