Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
vendors:cisco:uc:ece:webapi [2019/02/18 08:46] – [Output] gerardorourkevendors:cisco:uc:ece:webapi [2019/03/12 08:58] (current) gerardorourke
Line 63: Line 63:
 </code> </code>
  
-Example when 1 agent avilable that is allowed to handle 3 chats+Example when 1 agent available that is allowed to handle 3 chats
  
 Response: Response:
Line 125: Line 125:
 header("Content-Type: text/plain"); header("Content-Type: text/plain");
  
-$url = 'http://ucce-ece-db-12.lab2.purplepi.ie/system/egain/chat/entrypoint/capacity/1001'+$chatentry_id='1001'; 
-$file = file_get_contents($url);+$ecehostname='ucce-ece-db-12.lab2.purplepi.ie';
  
-echo $file;+$url = 'http://'.$ecehostname.'/system/egain/chat/entrypoint/capacity/'.$chatentry_id;
  
-$xml_data = str_replace("ns2:","",$file);+$ch = curl_init($url); 
 + 
 +    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
 +    curl_setopt($ch, CURLOPT_HTTPGET, 1); 
 +    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 2); //connection timeout 
 +    curl_setopt($ch, CURLOPT_TIMEOUT, 3); //timeout in seconds for transaction 
 + 
 +    $output = curl_exec($ch); 
 +    $info = curl_getinfo($ch); 
 +    curl_close($ch); 
 + 
 +echo $output; 
 + 
 +$xml_data = str_replace("ns2:","",$output);
  
 echo $xml_data; echo $xml_data;
  • vendors/cisco/uc/ece/webapi.1550479596.txt.gz
  • Last modified: 2019/02/18 08:46
  • by gerardorourke