API with PHP
-
Hello,
I am thankful for your API functions. When I use:
https://mywebsite.com/wp-json/filebird/public/v1/folders?token=mytoken i the Browser I get a list of all folders and subfolders, just what I wanted.Now I want to get this data with PHP. I use a function with a shortcode. This function does the following:
$url = ‘https://mywebsite.com/wp-json/filebird/public/v1/folders?token=mytoken’;
$data = file_get_contents($url);
$mydata = json_decode($data, true);The URL is the exact same in both cases. But my PHP version returns only a very limited number of folders, not all. And the IDs are mixed up and different to the other version.
My PHP code is wrong, obviously. But why?
Can you point me in the direction of the right solution?Thanks đ
- You must be logged in to reply to this topic.