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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:30:16+00:00 2026-05-26T07:30:16+00:00

I tried a lot scripts and none of them worked. This is the code

  • 0

I tried a lot scripts and none of them worked.

This is the code I have:

$contents = file_get_contents("http://video.foxnews.com/v/feed/video/1228085488001.js"); 
var_dump(json_decode($contents, true));

It outputs:

array(2) { [“@attributes”]=> array(1) { [“version”]=> string(3) “2.0”
} [“channel”]=> array(2) { [“title”]=> array(0) { } [“item”]=>
array(2) { [“title”]=> string(49) “Should Government Stay Out of
Foreclosure Crisis?” [“media-content”]=> array(32) { [“@attributes”]=>
array(1) { [“url”]=> string(60)
“http://media2.foxnews.com/102011/ff_massi_102011_FNC_MED.mp4” }
[“media-player”]=> array(1) { [“@attributes”]=> array(1) { [“url”]=>
string(91)
“http://video.foxnews.com/assets/video-player.swf?video_id=1228085488001&d=video.foxnews.com”
} } [“media-description”]=> string(39) “Real estate expert Bob Massi
sounds off” [“media-thumbnail”]=> string(70)
“http://video.foxnews.com/thumbnails/102011/640/360/ff_massi_102011.jpg”
[“media-keywords”]=> array(0) { } [“media-credit”]=> string(16)
“foxnews1-foxnews” [“mvn-assetUUID”]=> string(13) “1228085488001”
[“mvn-mavenId”]=> array(0) { } [“mvn-creationDate”]=> string(25)
“2011-10-20T08:38:49-04:00” [“mvn-airDate”]=> string(25)
“2011-10-20T08:38:49-04:00” [“mvn-shortDescription”]=> string(20) “Bob
Massi sounds off” [“mvn-mitvAudioOnly”]=> string(5) “false”
[“mvn-fnc_mp3”]=> array(0) { } [“mvn-fnc_grab_50x50”]=> string(68)
“http://video.foxnews.com/thumbnails/102011/50/50/ff_massi_102011.jpg”
[“mvn-fnc_grab_103x58”]=> string(69)
“http://video.foxnews.com/thumbnails/102011/103/58/ff_massi_102011.jpg”
[“mvn-fnc_grab_156x88”]=> string(69)
“http://video.foxnews.com/thumbnails/102011/156/88/ff_massi_102011.jpg”
[“mvn-flv1200”]=> string(60)
“http://media2.foxnews.com/102011/ff_massi_102011_FNC_MED.mp4”
[“mvn-fnc_framework”]=> array(0) { } [“mvn-fnc_channel”]=> string(6)
“on_air” [“mvn-domain”]=> array(0) { } [“mvn-duration”]=> string(3)
“188” [“mvn-fnc_feedTag”]=> array(0) { } [“mvn-fnc_format”]=>
string(2) “NA” [“mvn-fnc_category”]=> string(35)
“on_air|fox_friends|shattered_dreams” [“mvn-fnc_category2”]=>
string(26) “personality|brian_kilmeade” [“mvn-fnc_show”]=> string(2)
“NA” [“mvn-fnc_default_playlist”]=> array(0) { }
[“mvn-fnc_personality”]=> string(2) “NA” [“mvn-fnc_mp4”]=> string(61)
“http://media2.foxnews.com/102011/ff_massi_102011_FNC_HIGH.mp4”
[“mvn-fnc_grab_320x240”]=> string(70)
“http://video.foxnews.com/thumbnails/102011/320/240/ff_massi_102011.jpg”
[“mvn-fnc_grab_90x70”]=> string(68)
“http://video.foxnews.com/thumbnails/102011/90/70/ff_massi_102011.jpg”
[“mvn-source”]=> string(8) “Fox News” } } } }

When I do this:

$contents = file_get_contents("http://video.foxnews.com/v/feed/video/1228085488001.js"); 
var_dump(json_decode($contents->contents->channel->item->title, true));

It outputs:

NULL

What can I do to just get these variables from the .js file:

contents->channel->item->**title**
contents->channel->item->media-content->**media-description**
contents->channel->item->media-content->**mvn-fnc_grab_103x58**
  • 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-26T07:30:16+00:00Added an answer on May 26, 2026 at 7:30 am

    By specifying true as the last parameter to json_decode, you’re telling it to decode into an associative array. If you want to access the elements using object notation, don’t use true as the last parameter:

    $contents = file_get_contents("http://video.foxnews.com/v/feed/video/1228085488001.js"); 
    var_dump(json_decode($contents));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Tried this: $('.link').click(function(e) { $.getScript('http://www.google.com/uds/api?file=uds.js&amp;v=1.0', function() { $('body').append('<p>GOOGLE API (UDS) is loaded</p>'); }); return
I have several Lua scripts that run experiences and output a lot of information,
A lot of questions have been asked about gem support in Shoes, but none
I am a newbie with shell scripts and I learnt a lot today. This
I have tried a lot but I have not been able to find out
I have read a lot of topics and tried a lot of stuff but
I am writing a lot of JQuery code in a page and have decided
Okay, I have read, and tried a lot of things on how to implement
I searched and tried a lot, but I can't accomplish it as I want..
I am tying to make comments in a blog engine XSS-safe. Tried a lot

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.