Thread: Currency Converter - stream pull

  1. #1
    Registered User verbity's Avatar
    Join Date
    Nov 2006
    Posts
    101

    Currency Converter - stream pull

    Hello...I decided to work on a currency converter just for fun. It's fairly simple except for pullling current currency rates off the web from some place. Does anyone have any idea how to do this?? Cause I don't have the first clue. I 'm assuming you parse some html or xml file looking for specific data. But I wouldn't know how to "get" to that html or xml file.

    For example could I just automatically get on MSNBC everyday and yank their currency exchange rates off their site?? (provided I know how to parse through the info)...

    Any thoughts would be awesome....

    I welcome the sarcastic, mean programmers with no girlfriends as well!!!

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Quote Originally Posted by verbity View Post
    For example could I just automatically get on MSNBC everyday and yank their currency exchange rates off their site?? (provided I know how to parse through the info)...
    The easy way to tell would be to go to wherever you want to go, look at the source, and see if there's anything usable there. But that's just the check to see if there's something usable; once you see it, that will tell you how (or if) to parse it out.

    There are probably also places you can get raw data, but I would bet they charge for it. (In fact, I think MSNBC is simply licensing someone else's data, or at least I remember seeing "courtesy so-and-so" during the tv credits.)

    I welcome the sarcastic, mean programmers with no girlfriends as well!!!
    And we welcome you.

  3. #3
    Registered User verbity's Avatar
    Join Date
    Nov 2006
    Posts
    101

    Re:tabstop...

    Cool I'll check it out. I surmised as much last night....I know html and xml "fairly" well but didn't know what I was exactly looking for. I checked out a site that has one embedded and they use javascript to run that one but couldn't see where they were pulling data from.

    I don't even know how to tell my program how to get on the internet....much less anything else....much less where to look on the MSDN for it.

    I think I need to get rid of my wife so I can concentrate on this....

  4. #4
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    I know xe.com has some easily viewable currency data. I know they charge for the fancy stuff, but I can't say how upset they'd get about you scraping the site (probably not very, if you did it once a week or so).

    I don't know what the C# equivalent of winsock is. It might be winsock. (I have a feeling there's probably something fancier you can use, I just don't know what it is.) Then you have to figure out how to send/receive HTTP. Then you have to parse the result.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. converter currency in C
    By MyRedz in forum C Programming
    Replies: 7
    Last Post: 10-16-2008, 10:39 PM
  2. Basic C Help - Currency Converter
    By liljp617 in forum C Programming
    Replies: 9
    Last Post: 09-07-2008, 10:12 PM
  3. Newbie Help: Currency Converter
    By Ashfury in forum C Programming
    Replies: 10
    Last Post: 11-06-2005, 01:21 PM
  4. Currency Converter
    By mikmac in forum C Programming
    Replies: 3
    Last Post: 06-10-2003, 11:50 PM
  5. currency converter
    By Shalinee in forum C++ Programming
    Replies: 1
    Last Post: 03-19-2003, 03:27 AM

Tags for this Thread