How can i do this type of programing in my website?

Discussion in 'Programming' started by i_am_dhaval, Nov 1, 2011.

  1. #1
    i_am_dhaval, Nov 1, 2011 IP
  2. navifier

    navifier Member

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #2
    Learn php+html.
     
    navifier, Nov 3, 2011 IP
  3. KsNitro

    KsNitro Greenhorn

    Messages:
    60
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    20
    #3
    There are web services where you can pull data from those sources. I don't know exactly what this site is using, but generally you can use php or javascript to pull data from another source and use it in your pages. This can give you dynamic information that is updated and live on your site.
     
    KsNitro, Nov 3, 2011 IP
  4. i_am_dhaval

    i_am_dhaval Well-Known Member

    Messages:
    1,364
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    138
    #4
    can anyone tell where i can find this data?
     
    i_am_dhaval, Nov 3, 2011 IP
  5. i_am_dhaval

    i_am_dhaval Well-Known Member

    Messages:
    1,364
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    138
    #5
    i am trying to find out java script but not success. can anyone please help me?
     
    i_am_dhaval, Nov 6, 2011 IP
  6. pr0t0n

    pr0t0n Well-Known Member

    Messages:
    243
    Likes Received:
    10
    Best Answers:
    10
    Trophy Points:
    128
    #6
    Correct me if I'm wrong, but they are displaying their own company buy/sell prices for specific stuff (bars/coins/whatever). They are not just pulling this info from another site or market. Right?

    If they are pulling the prices automatic from some other source, then do you know what source?
     
    pr0t0n, Nov 10, 2011 IP
  7. i_am_dhaval

    i_am_dhaval Well-Known Member

    Messages:
    1,364
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    138
    #7
    i am finding when this type of price automatic updates

    is there any site they are giving some rss for this?

    this site is using his own price from admin i think so.
     
    i_am_dhaval, Nov 10, 2011 IP
  8. dthoai

    dthoai Member

    Messages:
    106
    Likes Received:
    2
    Best Answers:
    1
    Trophy Points:
    38
    #8
    You can use following code:

    
    function grabPrice() {
      $tag = array();
      $data = file_get_contents("http://www.wdavis.com.au/live-price-list.html");
      $pS = strpos($data, '<tr class="Product-Row-');
      $rno = 0;
      while ($pS !== false) {
        $p1 = strpos($data, "<td>", $pS);
        $p2 = strpos($data, "</tr>", $pS);
        if ($p1 === false || $p2 === false) continue;  
        $row = substr($data, $p1, $p2 - $p1);
        $p1 = strpos($row, "<td>", 0);
        $no = 0;
        $item = array();
        while ($p1 !== false) {
          $p2 = strpos($row, "</td>", $p1);
          if ($p2 === false) break;
          if ($no == 0) {
            $item['product'] = substr($row, $p1 + 4, $p2 - $p1 - 4);
            $no++;
            $p1 = strpos($row, "<td>", $p2);
            continue;
          }
          if ($no == 1) {
            $item['buy'] = substr($row, $p1 + 4, $p2 - $p1 - 4);
            $no++;
            $p1 = strpos($row, "<td>", $p2);
            continue;
          }
          if ($no == 2) {
            $item['sell'] = substr($row, $p1 + 4, $p2 - $p1 - 4);
            $no++;
            $p1 = strpos($row, "<td>", $p2);
            continue;
          }
          $p1 = strpos($row, "<td>", $p2);
        }
        if ($no >= 3) {
          $results[$rno] = $item;
          $rno++;
        }
        $pS = strpos($data, '<tr class="Product-Row-', $pS + 1);
      }
    }
    
    Code (markup):
     
    dthoai, Nov 12, 2011 IP
  9. i_am_dhaval

    i_am_dhaval Well-Known Member

    Messages:
    1,364
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    138
    #9
    this code is not working i just want to trace 2 - 3 values from this site

    how is this possible or any one can give other website who give us feed

    please help me
     
    i_am_dhaval, Nov 22, 2011 IP