-3

Hi Guys I have a JSON data I need to convert this data Treeview a json data url: http://torrent2dl.ml/json.php recovered state = http://torrent2dl.ml/json.php?tree

I tried to do http://torrent2dl.ml/hedef.php how to convert this data a php function or code ?

Disha V.
  • 1,834
  • 1
  • 13
  • 21

2 Answers2

1

json_decode($jsonObject, true);

Disha V.
  • 1,834
  • 1
  • 13
  • 21
0

Use json_decode() :

<?php
$url = 'http://torrent2dl.ml/json.php';
$JSON = file_get_contents($url);

// echo the JSON (you can echo this to JavaScript to use it there)
echo $JSON;

// You can decode it to process it in PHP
$data = json_decode($JSON);
var_dump($data);
?>

Source : https://stackoverflow.com/a/8344667/4652564

Community
  • 1
  • 1
Nicolapps
  • 819
  • 13
  • 29