+ Post New Thread
Results 1 to 7 of 7
Scripts Thread, suggestions for a script in Coding and Web Development; Im looking for a way to get the Australian exchange rate from XE - The World's Favorite Currency and Foreign ...
  1. #1

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,512
    Thank Post
    1,320
    Thanked 469 Times in 306 Posts
    Blog Entries
    6
    Rep Power
    199

    suggestions for a script

    Im looking for a way to get the Australian exchange rate from XE - The World's Favorite Currency and Foreign Exchange Site, and displayed. Bash or perl preferably, or something I can run on Linux. Basically just so I don't have to keep checking the page every day, maybe I can get it to email me each morning or something?

    Not really sure what Im after or how to go about it, so suggestions of methods or ideas are welcome please

  2. #2

    SYNACK's Avatar
    Join Date
    Oct 2007
    Posts
    11,061
    Thank Post
    853
    Thanked 2,675 Times in 2,269 Posts
    Blog Entries
    9
    Rep Power
    768
    This has a perl demo to grab a currency exchange rate automaticly, not from XE directly but if they run an xml webservice it could be easily adapted it currently uses a different free service.

    perl.com: Quick Start Guide with SOAP Part Two

  3. Thanks to SYNACK from:

    RabbieBurns (6th June 2009)

  4. #3

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,512
    Thank Post
    1,320
    Thanked 469 Times in 306 Posts
    Blog Entries
    6
    Rep Power
    199
    Quote Originally Posted by SYNACK View Post
    This has a perl demo to grab a currency exchange rate automaticly, not from XE directly but if they run an xml webservice it could be easily adapted it currently uses a different free service.

    perl.com: Quick Start Guide with SOAP Part Two
    Thanks. Ill have a deeper look in the morning, but I cant even get it running "as is":

    Code:
    robert@roberts ~ $ perl xe.pl
    500 Can't connect to services.xmethods.net:80 (Bad hostname 'services.xmethods.net') at xe.pl line 11

  5. #4


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,687
    Thank Post
    352
    Thanked 794 Times in 714 Posts
    Rep Power
    346
    Quote Originally Posted by RabbieBurns View Post
    Thanks. Ill have a deeper look in the morning, but I cant even get it running "as is":

    Code:
    robert@roberts ~ $ perl xe.pl
    500 Can't connect to services.xmethods.net:80 (Bad hostname 'services.xmethods.net') at xe.pl line 11

    kim@oddity ~ $ host services.xmethods.net
    Host services.xmethods.net not found: 3(NXDOMAIN)
    kim@oddity ~ $

    Doesn't exist

  6. #5

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,512
    Thank Post
    1,320
    Thanked 469 Times in 306 Posts
    Blog Entries
    6
    Rep Power
    199
    hmm, I just copied that script from the website verbatim, but I notice its from 2001 or something.

    Ill need to read more, as I dont understand the proxy bit of the script at all.

    Code:
     #!perl -w
    
      use SOAP::Lite;
    
      # GLUE http://www.themindelectric.com/ (running on XMethods.net)
    
      my $s = SOAP::Lite                             
        -> uri('urn:xmethods-CurrencyExchange')                
        -> proxy('http://services.xmethods.net/soap');
    
      my $r = $s->getRate(SOAP::Data->name(country1 => 'England'), 
                          SOAP::Data->name(country2 => 'Japan'))
                ->result;
      print "Currency rate for England/Japan is $r\n";

  7. #6

    SYNACK's Avatar
    Join Date
    Oct 2007
    Posts
    11,061
    Thank Post
    853
    Thanked 2,675 Times in 2,269 Posts
    Blog Entries
    9
    Rep Power
    768
    Here is a guide that should explain better:
    Quick Start Guide with SOAP and SOAP::Lite

    Did not check the date on the first one sorry, this provider looks to be still active:
    default

    and here is a whole list of publicly avalible web services:
    www.xmethods.net

  8. #7

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,512
    Thank Post
    1,320
    Thanked 469 Times in 306 Posts
    Blog Entries
    6
    Rep Power
    199
    Quote Originally Posted by SYNACK View Post
    Here is a guide that should explain better:
    Quick Start Guide with SOAP and SOAP::Lite

    Did not check the date on the first one sorry, this provider looks to be still active:
    default

    and here is a whole list of publicly avalible web services:
    www.xmethods.net
    cheers. Ill have a read in the morning.

    I blindly changed it to this:

    Code:
     #!perl -w
    
      use SOAP::Lite;
    
      # GLUE http://www.themindelectric.com/ (running on XMethods.net)
    
      my $s = SOAP::Lite
       -> uri('urn:xmethods-CurrencyExchange')
        -> proxy('http://www.webservicex.net/CurrencyConvertor.asmx');
    
      my $r = $s->CurrencyConvertor(SOAP::Data->name(FromCurrency => 'GBP'),
                          SOAP::Data->name(ToCurrency => 'AUD'))
                ->result;
      print "Currency rate for England/Australia is $r\n";
    but it doesnt work as I havent RTFM how to do it yet ;p

SHARE:
+ Post New Thread

Similar Threads

  1. Suggestions for updates....
    By mattx in forum EduGeek Admin Bar
    Replies: 2
    Last Post: 9th December 2008, 06:32 PM
  2. Suggestions please!!
    By AlfieBurton in forum Recommended Suppliers
    Replies: 0
    Last Post: 20th June 2008, 01:30 PM
  3. Logon script & Printer script question.
    By Galway in forum Windows
    Replies: 3
    Last Post: 29th August 2007, 11:00 AM
  4. Any suggestions...
    By Gatt in forum Jokes/Interweb Things
    Replies: 3
    Last Post: 22nd February 2007, 08:53 PM
  5. VOIP suggestions
    By nawbus in forum Wireless Networks
    Replies: 7
    Last Post: 19th September 2006, 11:29 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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