I can't run the code :/ #45
Answered
by
meduzen
mehmet0150
asked this question in
Q&A
-
Hello, I'm trying to run a page through hosting. I unzipped the files I downloaded from GitHub and uploaded them to the home directory. Here is the summary of my codes: <?php
use JsonMachine\JsonMachine;
$URL = 'https://www.binance.com/api/v3/depth?limit=5000&symbol=ETHBTC';
$JSON = file_get_contents($URL);
$obj = JsonMachine::fromFile($JSON);
echo "<PRE>";
var_dump($obj);
?> I am a little newbie in PHP. I guess I can't call the code correctly. Can you help with this? |
Beta Was this translation helpful? Give feedback.
Answered by
meduzen
Apr 2, 2021
Replies: 1 comment 3 replies
-
I think you should use |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
halaxa
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think you should use
fromString
instead offromFile
.