RE: PHP Web Services

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use nuSoap.php  It is an include file that I have used to create a few
web service client pages.

http://dietrich.ganx4.com/nusoap/index.php

http://www.google.com/apis/

<?php
      require_once('nusoap.php');
      $Search = "something";
      $soapclient = new
soapclient('http://api.google.com/GoogleSearch.wsdl','wsdl');
      $soap_proxy = $soapclient->getProxy();
      $temp = $soap_proxy->doGoogleSearch('This is a key that you need
to get from google.com', $Search, 0, 10, false, "", false, "", "", "");

      if ($temp["estimatedTotalResultsCount"] > 0) {
         foreach($temp["resultElements"] as $value) {
            echo "<a
href=\"".$value["URL"]."\">".$value["title"]."</a><br>";
            echo $value["snippet"]."<br>";
            echo "URL: ".$value["URL"]."<br>";
            echo "<br>";
         }
      } else {
         echo "Your Search returned Zero results.  Plesae try
again.<br>";
      }
?>

Code is provided as is.  Feel free to use but I offer no guarantees
about the code.

You should have a wsdl file to make the job for the client developers a
lot easier.

Charles Killmer


-----Original Message-----
From: Pearson, Gregory [mailto:Gregory_Pearson@adp.com] 
Sent: Monday, September 29, 2003 3:04 PM
To: 'php-windows@lists.php.net'
Subject:  PHP Web Services


Has anyone done this with PHP? I'm looking for the best way to create a
web service on a hosted server. Currently, the provider is running the
SOAP:Lite
(PERL) module, but I'd rather not have to learn PERL.


_______________________________ 

This message and any attachments are intended only for the use of the
addressee and may contain information that is privileged and
confidential. 

If the reader of the message is not the intended recipient or an
authorized representative of the intended recipient, you are hereby
notified that any dissemination of this communication is strictly
prohibited. If you have received this communication in error, please
notify us immediately by e-mail and delete the message and any
attachments from your system. 

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux