How to show updates?

Discussion in 'PHP' started by Om ji Kesharwani, Oct 26, 2010.

  1. #1
    How to show updates like community sites orkut,facebook do when friend uploaded any video or image.

    Whats the basic idea ? or structure of database.
     
    Om ji Kesharwani, Oct 26, 2010 IP
  2. w47w47

    w47w47 Peon

    Messages:
    255
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    get theyr API (of fb,orkut)? they usually have premade scripts for this already and you just have to paste it into your code. or do you want to make your own API so that other sites can display your updates?
     
    w47w47, Oct 26, 2010 IP
  3. silviuks

    silviuks Peon

    Messages:
    43
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Try using setTimeout (from javascript).
     
    silviuks, Oct 26, 2010 IP
  4. Om ji Kesharwani

    Om ji Kesharwani Peon

    Messages:
    211
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Please tell me the best way to fetch updates done by the friends
     
    Om ji Kesharwani, Oct 26, 2010 IP
  5. Rainulf

    Rainulf Active Member

    Messages:
    373
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    85
    #5
    lolwut?

    in php? Really, the best is to go to their websites and read info about fetching data, i'm sure they've done some documentations about it
     
    Rainulf, Oct 26, 2010 IP
  6. silviuks

    silviuks Peon

    Messages:
    43
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Maybe I'm missing the point, but the guy wants to know how to do something like that, not to get infos from those sites.
     
    silviuks, Oct 26, 2010 IP
  7. Om ji Kesharwani

    Om ji Kesharwani Peon

    Messages:
    211
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Ya i want to do somthing like those sites. I want to show updates from my own database.
     
    Om ji Kesharwani, Oct 27, 2010 IP
  8. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #8
    danx10, Oct 27, 2010 IP
  9. silviuks

    silviuks Peon

    Messages:
    43
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Maybe this will be helpful:
    
    <html>
    <head>
    <script type="text/javascript" src="includes/js/jquery.js"></script>
    <script type="text/javascript">
    function getUpdates() {
    $("#content").load("http://url-to-php-file", '', callback);
    }
    
    function callback() {
    $("#content").show("slow");
    setTimeout("getUpdates();", 2000);
    }
    
    $(document).ready(getUpdates);
    </script>
    </head>
    <body>
    <div id="content">
    some content
    </div>
    </body>
    </html>
    
    Code (markup):
    and your php file should get updates from your friends.
     
    silviuks, Oct 28, 2010 IP
  10. kasun0777

    kasun0777 Well-Known Member

    Messages:
    355
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    138
    #10
    u can retrieve latest data in data base
    SELECT name, table FROM row ORDER BY date DESC;
    
    Code (markup):
    put a new row about date
     
    kasun0777, Oct 28, 2010 IP
  11. viriya123

    viriya123 Peon

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    I think the best way to show our updates for others is using RSS feeds.
     
    viriya123, Oct 28, 2010 IP