SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist
    Join Date
    Mar 2008
    Posts
    551
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile How to use this simple webservice

    HI all,
    This is my first time using a webservice with php. Google has been pretty useless. How can I use this service? http://www.webservicex.net/CurrencyConvertor.asmx?WSDL
    Thank you

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Bayliss Trevor View Post
    Google has been pretty useless.
    I googled "web service php" and the first result was a tutorial on consuming web services with PHP. Seems pretty useful as that's exactly what you need

    The nuSoap example is most useful for you.

  3. #3
    SitePoint Evangelist
    Join Date
    Mar 2008
    Posts
    551
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi dan I didnt find that link I am using another one. Anyway here is my code:

    PHP Code:
    <?
    require_once('nusoap.php');
    $wsdl="
    http://www.webservicex.net/CurrencyConvertor.asmx?WSDL"
    ;
    $client=new soapclient($wsdl'wsdl');
     
    $param=array(
    'Currency'=>'usa',
    'Currency'=>'canada'
    ); 
    echo 
    $client->call('ConversionRate'$param);
    ?>


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •