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 8771135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:42:40+00:00 2026-06-13T17:42:40+00:00

When I go to this url in by browser, it shows me the json

  • 0

When I go to this url in by browser, it shows me the json feed i expect:

https://www.facebook.com/feeds/page.php?format=json&id=237173582992285

When in PHP I do a

<?php
print_r(file_get_contents('https://www.facebook.com/feeds/page.php?format=json&id=237173582992285'));
?>

I get an html page saying my browser is not supported by facebook and that I should upgrade. How do I make the file_get_contents return the json feed I’m expecting?

Additional Notes I also tried from bash wget https://www.facebook.com/feeds/page.php?format=json&id=237173582992285 and the file I downloaded also has html content saying browser not supported.

  • 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-06-13T17:42:40+00:00Added an answer on June 13, 2026 at 5:42 pm

    Try this, it works for me

     $ch = curl_init("https://www.facebook.com/feeds/page.php?format=json&id=237173582992285");
      curl_setopt( $ch, CURLOPT_POST, false );
      curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
      curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7");
      curl_setopt( $ch, CURLOPT_HEADER, false );
      curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
      $data = curl_exec( $ch );
      echo $data;
    

    As pointed by @Michael Mior, it violates facebook terms. But this is
    the answer to your question, facebook has a simple check to ensure
    that page should be opened by browser and thus we are mimicking it by
    setting useragent header.

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

Sidebar

Related Questions

I'm writing this URL in my browser: https://landfill.bugzilla.org/bugzilla-tip/post_bug.cgi?Bugzilla_login=mymail@hotmail.com&Bugzilla_password=password&product=WorldControl&version=1.0&component=WeatherControl&rep_platform=All&op_sys=All&priority=P2&bug_severity=normal&target_milestone=World%202.0&bug_status=CONFIRMED&assigned_to=somemail@hotmail.com&short_desc=bla&form_name=enter_bug&token=someToken or more clean: https://landfill.bugzilla.org/bugzilla-tip/post_bug.cgi ?Bugzilla_login=mymail@hotmail.com &Bugzilla_password=password
I really need help on reading the JSON data on this URL: http://www.cloudspokes.com/members/ferbie12/past_challenges.json I
I have the following URL: https://api.stackexchange.com/2.0/questions?page=1&pagesize=30&order=desc&sort=activity&site=stackoverflow When I type this URL in my browser's
do you test this url in your application that writted with cakephp ? www.yourCakephpApp.com/test
I am using this URL http://search.twitter.com/search.json to grab tweets with the hash tag #SameHashTag
I have a jquery script as below: $.ajax({ type: GET, url: http://www.site.com/v4/ajax/get_song_info.php, data: ({id
I have this url : http://shops.alpha-trend.com/mobileapp/productinfo.php?productId=4363&function=GetProductInfo&show=yes . when i test this url in browser
i have a working example which uses this url http://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=jQuery16201154390876987067_1314382298849&tags=cat&tagmode=any&format=json&_=1314382298856 which gives me this
chrome.cookies.get({url:http://www.dahotre.com, name:userid}, function(){}) shows undefined in the console. If I skip the optional empty
I have this URL example.com/photo?people I want to rewrite this URL in the form

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.