Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6241129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:42:14+00:00 2026-05-24T11:42:14+00:00

i am doing this : <?php echo json_decode(file_get_contents(http://graph.facebook.com/?id=8083675473))->likes; ?> Sometimes, it takes .2 seconds,

  • 0

i am doing this :

<?php echo json_decode(file_get_contents("http://graph.facebook.com/?id=8083675473"))->likes; ?>

Sometimes, it takes .2 seconds, sometimes it takes 30 seconds. The problem is the load time of this page: http://graph.facebook.com/?id=8083675473.

Now i wonder why sometimes it is slow. Maybe facebook has limitations on the number of request i can make ?

I just want to show the number of like somewhere, what is the best way to retrieve it without slowing down the whole page?

I tried to load the content by ajax, but it does not work since it is a cross site request.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T11:42:15+00:00Added an answer on May 24, 2026 at 11:42 am

    Now i wonder why sometimes it is slow. Maybe facebook has limitations on the number of request i can make ?

    Yes, but if you reach the quota, you can not even getting any data

    I just want to show the number of like somewhere, what is the best way to retrieve it without slowing down the whole page?

    Cache locally, that’s mean get the results from facebook,
    and write it to disk-file/database/memcache,
    subsequently, you will be no longer require to fetch the data from facebook

    in order to keep the data freshness, you should periodically (schedule) to update the cache

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is the way I am currently doing it. <?php //show footer echo <script
I'm doing this tutorial: http://www.phpeveryday.com/articles/Zend-Framework-Database-Creating-Input-Form-P494.html We are building a simple input form using POST
So I'm doing this in PHP but it is a logic issue so I'll
I'm now doing this: rewriterule ^jobs/([0-9]+)/.* job.php?id=$1 Which will erase parameters in jobs/1010/title?k=v How
I want to use an access card reader with PHP. I am doing this
Hi I am doing my project in PHP.In this when the use r doesnt
Right now I'm doing something like this: RewriteRule ^/?logout(/)?$ logout.php RewriteRule ^/?config(/)?$ config.php I
This is more a question of pros/cons between PHP and JAVA. Iv been doing
I've been doing some HTML scraping in PHP using regular expressions. This works, but
I often find myself doing quick checks like this: if (!eregi('.php', $fileName)) { $filename

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.