|
|
|
@ -1,23 +1,4 @@
|
|
|
|
|
<?php
|
|
|
|
|
function get_IA_Response($iaUrl,$postParams){
|
|
|
|
|
//send params JSON as body
|
|
|
|
|
$data_string = json_encode($postParams);
|
|
|
|
|
|
|
|
|
|
$ch = curl_init($iaUrl);
|
|
|
|
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
|
|
|
|
|
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
|
|
|
|
|
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
|
|
|
|
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
|
|
|
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
|
|
|
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
|
|
|
|
|
'Content-Type: application/json',
|
|
|
|
|
'Content-Length: ' . strlen($data_string))
|
|
|
|
|
);
|
|
|
|
|
$output= curl_exec($ch);
|
|
|
|
|
curl_close($ch);
|
|
|
|
|
//echo $iaUrl." ".$data_string." ".$output.'<br/>';
|
|
|
|
|
return json_decode($output,TRUE);
|
|
|
|
|
}
|
|
|
|
|
function get_Post_Params($botsCount){
|
|
|
|
|
$keysBots=array('bot1','bot2');
|
|
|
|
|
foreach($keysBots as $botKey){
|
|
|
|
|