1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

taking a live price from a webpage

Discussion in 'HTML & Website Design' started by FromBeyond77, Dec 8, 2014.

  1. #1
    How do I take a live indice from the internet to display it on my personal webpage ?

    for eg. if i want to take live gold or oil price from a particular webpage ?
     
    FromBeyond77, Dec 8, 2014 IP
  2. emdubl

    emdubl Member

    Messages:
    74
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #2
    Well, you can connect to that page and read the HTML content into a variable and then parse it from the string. That is a very simplified explanation. It can be a lot more tricky, but that is the basic idea.

    I do something similar on one of my sites. I show deals from various websites and I have a clock that counts down until the end of the deal. I read the price and time left in the deal from the HTML of each particular deal site, so that I can display it on my site. gearsniper dot com.
     
    emdubl, Dec 10, 2014 IP
  3. sarahk

    sarahk iTamer Staff

    Messages:
    28,494
    Likes Received:
    4,457
    Best Answers:
    123
    Trophy Points:
    665
    #3
    You may find that the bigger sites will give you an xml feed or a javascript widget to use so long as you give them credit for the data.
     
    sarahk, Dec 10, 2014 IP
  4. COBOLdinosaur

    COBOLdinosaur Active Member

    Messages:
    515
    Likes Received:
    123
    Best Answers:
    11
    Trophy Points:
    95
    #4
    If a site makes it available, they will offer a feed or an api. If they do not make it available and the page contains a copyright, then you are trying to steal copyright content, and when they detect what you are doing, they will block your site and may pursue legal action.
     
    COBOLdinosaur, Dec 10, 2014 IP
    sarahk likes this.
  5. emdubl

    emdubl Member

    Messages:
    74
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #5
    yeah other than scraping, you may be able to find some kind of api or feed that will provide the data more easily. i would think that there is probably something already out there that will give you a live quote, such as a stock price. I've done this before on a wordpress page using a plugin a long time ago.... assuming that is what you are trying to do.
     
    emdubl, Dec 10, 2014 IP