BizTalk Utilities CV ,   Jobs ,   Code library  
 
Home Page
PHP XML
PHP XML RPC Function Encode
PHP XML RPC Function DecodeRequest
PHP DOMXPath Function registerNamespace
PHP DOMXPath Function query
PHP DOMText Function splitText
PHP DOMText Function isWhitespaceInElementContent
PHP DOMNode Function replaceChild
PHP DOMNode Function lookupPrefix
PHP DOMNode Function lookupNamespaceURI
PHP DOMNode Function isSupported
PHP DOMNode Function isSameNode
PHP DOMNode Function insertBefore
PHP DOMNode Function hasChildNodes
PHP DOMNode Function hasAttributes
PHP DOMNode Function cloneNode
PHP DOMNodelist Function item
PHP DOMNamedNodeMap Function item
PHP DOMNamedNodeMap Function getNamedItemNS
PHP DOMNamedNodeMap Function getNamedItem
PHP DOMImplementation Function hasFeature
 
 

By :Mark Wilson
I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
First posted :03/24/2008
Times viewed :183

 

PHP XML RPC Function EncodeRequest

PHP Version: (PHP 4 >= 4.1.0, PHP 5)

Description

This function generates XML for a method request for RPC server.

Usage:

string xmlrpc_encode_request ( string method, mixed params [, array output_options])

This function converts request into XML format so that it can be sent to RPC server. All requests to RPC server should be encoded before it can be sent to the server. Let’s look at the example below.

PHP Code:

<?php

//the host URI which will be served as a server

$host = 'localhost';

//the port of the server to be used for communication

$port = 80;

//encode the request into xml format before sending it to server.

$request = xmlrpc_encode_request('dummyserver', 'test1');

print $request;

?>

Output

<?xml version="1.0" encoding="iso-8859-1"?>

<methodCall>

<methodName>dummyserver</methodName>

<params>

<param>

<value>

<string>test1</string>

</value>

</param>

</params>

</methodCall>

The above xml structure shows the structure of xml to be sent to the server.

To know more details on XML-RPC, please find the URL http://www.xmlrpc.com/ and http://xmlrpc-epi.sourceforge.net/


Rate this article on a scale of 1 to 10

Your vote :  


 

Recent Jobs

Sr. Software Engineer - Analytics
Immediate Mainframe openings for Ch
Immediate TANDEM-TAL openings for C
Immediate ASP.NET/C# Openings for C
Sr. Software Engineer

View all Jobs (Add yours)
View all CV (Add yours)



help desk
water softener
Teleconference
Host Department NOLIMIT Web Hosting
MSN
sunglasses
help desk services


    Email TopXML  

Front Page Daily Stuff TopXML Forum XML blogs XML Newsgroups BizTalk Biztalk Utilities Biztalk Utilities Tutorial B2B SAP XML Microsoft .NET Dotnet System XML Soapformatter SQLXML XMLserializer XQuery PHP PHP SimpleXML PHP XML Dom PHP XML RPC PHP XSLT Java Java Java XML Xalan Microsoft ASP ASP Schemas XML SQL Server XML XMLDom XSL XSL Tutorial XSLT Stylesheets General Javascript CSS XHTML WAP