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

  • Home
  • SEARCH
  • 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 8416067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:38:08+00:00 2026-06-10T01:38:08+00:00

I trying to get json data from website. In the first link, it returns

  • 0

I trying to get json data from website. In the first link, it returns blank.
But in the second, it returns json.

Someone know how I could to do to get json data from the first link?

Before access this code, please login in this link:
https://loginfree.globo.com/login/438
user: cartolaewlfa@gmail.com
pass: cartoletasfc

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<iframe src="http://cartolafc.globo.com/time/claudioivp-allianz/atletas.json?rodada_id=12"></iframe>
<?php
$file = json_decode(file_get_contents("http://cartolafc.globo.com/time/claudioivp-allianz/atletas.json?rodada_id=12"));

print_r($file);

echo "casa";
?>

<iframe src="http://cartolafc.globo.com/mercado/filtrar.json?page=1&order_by=preco&clube_id=277"></iframe>
<?php
$file = json_decode(file_get_contents("http://cartolafc.globo.com/mercado/filtrar.json?page=1&order_by=preco&clube_id=277"));

print_r($file);

echo "casa";
?>
</body>
</html>
  • 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-10T01:38:10+00:00Added an answer on June 10, 2026 at 1:38 am

    Well apparently the first json URI requires the user to be logged in the website otherwise it redirects you to the homepage and the second one appears to be open to everyone.

    The only solution I see here is to use curl (or any other method you’d like) to emulate a browser and follow the login process for that website, sending in your login, password and any other info that it requires. Then you can catch the cookies that it will generate. After you get the cookies you can keep then stored in a cookiejar file or a database.

    With these cookies you’ll be able to retrive the json file, you can send them through a file_get_contents by using a stream_context object or if you’re using curl there is the CURLOPT_COOKIE and CURLOPT_COOKIEJAR

    Of course these cookies will expire. Just set-up a verification process in which it gets new cookies if the stored ones have expired.

    If the contents of this json file do not update with a high frequency or if it’s not really important for the users to get these updates right away you could just keep a copy of this json file in your server without any access restriction.

    It would be silly but in case that domain is YOURS (or you have access to it) just cut out the login verification in that file??

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

Sidebar

Related Questions

I'm trying to get JSON data from a website using the following code, but
I'm trying to get some json data from a remote website. I run my
I am trying to get Json format data from this website .. http://www.livetraffic.sg/feeds/json however
I'm trying to get some json data in my application, but it won't come
I am trying to get JSON data loaded from a NSURLConnection delegate to send
I'm trying to get some JSON data from a url like this: $url =
Iam trying to return json data from codeigniter view. but my code is not
I'm trying to pull JSON data from another source by using the jquery.get method.
I am trying to get JSON data from a string that I have created
I am trying to get an event calendar working from json data. I just

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.