WS_OK_7.4.33 HEX
HEX
Server: nginx/1.21.4
System: Linux v12674 6.8.0-85-generic #85-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep 18 15:26:59 UTC 2025 x86_64
User: endtheignorance (1014)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
Upload Files
File: /storage/v12674/lcafresno/public_html/wp-content/plugins/rake-live-chat/views/bot-status.php
<?php
if (!defined('ABSPATH')) {
  exit; // Exit if accessed directly
}
function rake_live_chat_getBotStatus(&$bot, $hash, $env) {
  $parsedEnv;
  preg_match("/https?:\/\/widget-?(uat|test)?\.rake\.ai\/js\/widget\.js/",$env,$parsedEnv);
  if (count($parsedEnv) >= 1) {
    // $url = 'https://admin';
    // if (count($parsedEnv) == 2) {
    //   $url .= "-".$parsedEnv[1];
    // }
    $url = "https://admin.rake.ai/rake-live-chat/status?hash=".$hash."&info=workspace";
    $WP_Http = new WP_Http();
    $API_KEY = '72d06590-dc8b-433a-94b6-b7531b6fdb55';
    $headers = array('apikey' => $API_KEY);
    $result = $WP_Http->request( $url, array('headers' => $headers, 'sslverify' => false));
    // echo "url:$url, body";
    // print_r($result['body']);
    // echo "<br>";
    if (!is_wp_error($result) && $result['response']['code'] == '200') {
      $bot->exists = TRUE;
      $body = json_decode($result['body']);
      $bot->status = $body->platform && $body->workspaceStatus;
      $bot->workspace = isset($body->workspace->id) ? TRUE : FALSE;
    }
  }
}
?>