Miscellaneous

  Home arrow Miscellaneous arrow Page 2 - Remote Procedure Calls with PEAR::XML-...
MISCELLANEOUS

Remote Procedure Calls with PEAR::XML-RPC
By: bluephoenix
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 4
    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

  •  
     

    SEARCH CODEWALKERS

    TOOLS YOU CAN USE

    advertisement

    Remote Procedure Calls with PEAR::XML-RPC - The Example Script


    (Page 2 of 12 )

    For exploration purposes, let's create a small script that will make use of function calls.

    <?php
    function getNameLength($name1$name2) {
      
    $length strlen($name1) + strlen($name2);
      return 
    $length;
    }

    $first "George";
    $last "Washington";
    $number getNameLength($first$last);

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

    It isn't too exciting... we've created getNameLength, a simple function which will accept a person's first and last name and return it's aggregate length. The name George has been set to $first, the name Washington has been set to $last and the return value of getNameLength will be set to $number. We've concluded the script by outputting our results.

    More Miscellaneous Articles
    More By bluephoenix

    blog comments powered by Disqus

    MISCELLANEOUS ARTICLES

    - Oracle Database XE: Indexes and Sequences
    - Modifying Tables in Oracle Database XE
    - Oracle Database XE: Tables and Constraints
    - More on Oracle Databases and Datatypes
    - Oracle Database XE Datatypes: Datetime and L...
    - Oracle Database XE Datatypes: Character and ...
    - From Databases to Datatypes
    - 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


    © 2003-2012 by Developer Shed. All rights reserved. DS Cluster 9 - Follow our Sitemap