Getting data from another site

Discussion in 'PHP' started by KingCobra, Jun 24, 2009.

  1. #1
    How can I get data from the following link?

    the page update every fiew minutes.

    I want to get all data from this (another site) page and store my sql database so that I can use them anyway. Is it possible?

    Please help.
     
    KingCobra, Jun 24, 2009 IP
  2. Social.Network

    Social.Network Member

    Messages:
    517
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    35
    #2
    Sure. Fetch the page, parse data, and store in MySQL. There are many examples on the web and here on DP. Does the data change on a scheduled basis? If so, you need to repeat the process and update the MySQL data as needed. Also, you must know that if the site changes the page format it will break your "screen scraping" code. http://tinyurl.com/l7lcva
     
    Social.Network, Jun 25, 2009 IP
  3. KingCobra

    KingCobra Well-Known Member

    Messages:
    289
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #3
    any body can make a example from this site?
     
    KingCobra, Jun 25, 2009 IP
  4. www.amagit.com

    www.amagit.com Peon

    Messages:
    87
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Make sure the following is in your php.ini file.
    allow_url_fopen = On

    Then use file_get_contents("http://dsebd.org/latest_share_price_all.php"); to get the source of the page.

    From there, use the data as needed.
     
    www.amagit.com, Jun 25, 2009 IP
  5. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #5
    Yea if u doo

    file_get_contents("http://dsebd.org/latest_share_price_all.php");

    it will pull the full source into your site and show that
     
    Bohra, Jun 25, 2009 IP
  6. franklyn

    franklyn Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    in case you dont have access to file_get_contents and you cant do anything about it , use curl.
     
    franklyn, Jun 25, 2009 IP
  7. credobyte

    credobyte Peon

    Messages:
    38
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #7
    CURL would be the most accurate way of fetching external data ( set referrer to something not too scary :D ).
     
    credobyte, Jun 25, 2009 IP
  8. matthewrobertbell

    matthewrobertbell Peon

    Messages:
    781
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I'd be able to do this quickly, for a fee
     
    matthewrobertbell, Jun 26, 2009 IP
  9. Wrighty

    Wrighty Peon

    Messages:
    199
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #9
    If interested, PM me - I can get this done for you! :)
     
    Wrighty, Jun 26, 2009 IP
  10. KingCobra

    KingCobra Well-Known Member

    Messages:
    289
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #10
    Deal all of wellwisher

    Thanks for your help. I did this successfully.

    Special thanks to 'Social.Network'
     
    KingCobra, Jun 27, 2009 IP