I am using the insert PHP plugin for wordpress to get API data into my pages. so I would replace "" on the last line with "[/insert_php]".
my code
[insert_php]
$url = 'https://www.eobot.com/api.aspx?idspeed=285967&json=true';
$args = array (
'method' => 'GET'
);
$response = wp_remote_request($url, $args);
$body = wp_remote_retrieve_body($response);
print_r($body);
[/insert_php]
returns
MiningSHA-256:0.00000000;MiningScrypt:0.00000000;CloudSHA-256:12.72592330;Cloud2SHA-256:0.01894240;CloudScrypt:0.00000000;
I have searched, and maybe I am not using the correct terms, and cannot find my solution or answer. I feel like it should be a lot easier than it is. I feel I should be able to take the array from the body and give each its own variable then use the variables to build a table with PHP. Where am I going wrong? Should I first store this in a php file on my server then create a table, then use the insert php function to build the table that way?