Bom Dia
Como faço para consumir essa API carregando no meu form para gravar no banco de dados dentro do banco de dados .
- $url = ‘https://api2.isbndb.com/book/9780134093413’;
- $restKey = ‘xxxxxxx545454544544xxxxx’;
- $headers = array(
- “Content-Type: application/json”,
- "Authorization: " . $restKey
- );
- $rest = curl_init();
- curl_setopt($rest,CURLOPT_URL,$url);
- curl_setopt($rest,CURLOPT_HTTPHEADER,$headers);
- curl_setopt($rest,CURLOPT_RETURNTRANSFER, true);
- $response = curl_exec($rest);
- echo $response;
- print_r($response);
- curl_close($rest);
Nos testa da API quando executo ela me retorna essas informações
{
"title": "string",
"title_long": "string",
"isbn": "string",
"isbn13": "string",
"dewey_decimal": "string",
"binding": "string",
"publisher": "string",
"language": "string",
"date_published": "2022-06-24T10:45:12.559Z",
"edition": "string",
"pages": 0,
"dimensions": "string",
"overview": "string",
"image": "string",
"msrp": 0,
"excerpt": "string",
"synopsys": "string",
"authors": [
"string"
],
Obrigado a todos