I need to get data from an API using curl in PHP, but I have no experience with this?
I've been using PHP for a while now (beginer/intermediate level), but I don't know how to use the curl command or how to make a PHP version of this.
All I know of the API is that to get a list of all the books I kan use:
curl --request GET \
--url 'http://example.com/{identifier}'
using "main" as the {identifier}
This is supposed to give me a list of alle the books, and then I can use
curl --request GET \
--url 'http://example.com/feed/{identifier}'
to get the (meta) data of the books (Title, Author, Description, Year, Cover)
I've tried using $curl = curl_init("http://example.com/feed/main");
and then using curl_setopt_array($curl, array()
to get the data, but i get an "WARNING curl_init() has been disabled for security reasons" error.
I'm totally lost and starting from scratch on these API/curl calls...
Hope someone can explain it to me?
(using Xampp on Windows)