Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7011951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:11:33+00:00 2026-05-27T22:11:33+00:00

I want to take the values from the URL and perform a currency conversion

  • 0

I want to take the values from the URL and perform a currency conversion based on them. EG-

I want to receive URL’s as:

http://www.mysite.com/conv/?amnt=7.15&from=GBP&to=USD

The returned results will then be in XML format.

My question is – how can I read those values, check for particular errors, perform the convert function and finally output the XML response using a RESTful interface?

Obviously, I’m not looking for the code to be written for me, I just need the logic explained to me and how can I can go about building this (I’m very new to this so forgive the vagueness)

Any help is much appreciated! Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T22:11:34+00:00Added an answer on May 27, 2026 at 10:11 pm

    After much research and many questions I’ve nearly finished building this 🙂

    Here’s how I did it in pseudo-code:

    1) URL is called
        - Check for request type (get/put etc)
        - Add the get values to PHP variables
        - Check for errors in the GET call (if error, load error from our pre-defined errors file and build XML page + change content type)
        - If all is good - load the currency converson function
    2) Call conversion function
        - Load currency rates from XML file in Cache
        - Check currency timestamp (If older than 2 hours, re-import from web with fallback options).
        - Perform conversion using the available variables
        - Build XML response and output to page.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Well ,thats my code.I want to take values from a DatePicker from a custom
I'm trying to scrape data from the table at the following url: http://www.nfpa.org/itemDetail.asp?categoryID=953&itemID=23033 The
I want to take the values from this site for the country table in
I am creating an URL like this: www.mysite.com/xyz.php/0:100003044058740-1:100000657838131-2:100001676304188-3:1075440919-4:100002474721536-5:100003033556875-6:1257699872-7:1257699872-8:100000501703505-9:100000297352382 from this function in my .php
Basically I want to grab an id send via the url (ex. www.website.com/?id=432432) and
I have a html form. I want to take the input value (a url),
In an Apache Camel route, I want to take several headers and compose them
How to collect variables from a URL, insert them into an array and dynamically
I have a web form to which I want to take a parameter from
Iam developing a site in codeigniter.This is my url http://myserver.net/visio/UBwXo . Here h ttp://myserver.net/visio/

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.