Specifically I am looking to update the URLs that are to be scraped. Documentation can be found here: https://www.kimonolabs.com/apidocs#SetCrawlUrls
Unfortunately my knowledge about cURL and RESTful APIs is limited to say the least. My most recent failed attempt was:
$ch = curl_init("https://kimonolabs.com/kimonoapis/");
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json', 'kimonoapis/$api_id/update'));
curl_setopt($ch, CURLOPT_POSTFIELDS, $data)
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);
where $data is an array of:
array(2) {
["apikey"]=>
string(32) "API_KEY"
["urls"]=>
array(2) {
[0]=>
string(34) "URL 1"
[1]=>
string(34) "URL 2"
}
}
I have also tried variations of json_encode, passing the parameters in the query string, and different variations of cURL but have not be successful thus far. How do you successfully take advantage of their RESTful API?