RabbieBurns Posted June 6, 2009 Posted June 6, 2009 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
SYNACK Posted June 6, 2009 Posted June 6, 2009 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 1
RabbieBurns Posted June 6, 2009 Author Posted June 6, 2009 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": robert@roberts ~ $ perl xe.pl 500 Can't connect to services.xmethods.net:80 (Bad hostname 'services.xmethods.net') at xe.pl line 11
kmount Posted June 6, 2009 Posted June 6, 2009 Thanks. Ill have a deeper look in the morning, but I cant even get it running "as is": 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
RabbieBurns Posted June 6, 2009 Author Posted June 6, 2009 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. #!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";
SYNACK Posted June 6, 2009 Posted June 6, 2009 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
RabbieBurns Posted June 6, 2009 Author Posted June 6, 2009 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: #!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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now