Thursday, July 24, 2008
Home | Benchmarks | Documentation | Samples | FAQ | Links | Download
search php-soap for  


Samples

1. Hello World

 

Description:

 
  This is a simple soap client/sever. The server will just echo back what the client sends it.

 
 

Client:  hello_world-client.php

 
 

<?
$hello
= new SoapObject("http://www.yourserver.com/hello_world.php", "urn:HelloWorld");
echo
$hello->hello_soap();
?>
1


 
 

Server:  hello_world-server.php

 
 

<?
$server
= new SoapServer("urn:HelloWorld");
$server->addFunction("hello_soap");
$server->handle();

function
hello_soap($message)
{
    return
"PHP-SOAP says ($message)";
}
?>
1


 
blue | green | yellow | grey
SourceForge Logo
Go to the main PHP site