hi i have a problem with cURL and php. I use an API and i want to display only the results. Here is my php + curl script
<?php
$file = "http://api.openkvk.nl/php/".rawurlencode("SELECT * FROM kvk WHERE kvks='20147376'");
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_URL, $file);
curl_setopt($ch, CURLOPT_HEADER, 0);
// grab URL and pass it to the browser
curl_exec($ch);
// close cURL resource, and free up system resources
curl_close($ch);
?>
and the result what i get is this:
array(
array("RESULT" => array(
"TYPES"=>
array(
"int", "bigint", "varchar", "varchar", "varchar", "varchar", "varchar", "int", "int", "smallint", "smallint", "int"
),
"HEADER"=>
array("id", "kvk", "bedrijfsnaam", "adres", "postcode", "plaats", "type", "kvks", "sub", "bedrijfsnaam_size", "adres_size", "verhuisd"),
"ROWS"=>
array(
array("1008714", "20147376", "Stichting OpenGeo", "Spinellihof 44", "4463GP", "Goes", "Rechtspersoon", "20147376", NULL, "17", "14", "0")
)
)));