Example #1
0
 static function log2($v, $i = null)
 {
     $msg = null;
     if ($i !== null) {
         $msg = _hx_string_or_null($i->fileName) . ":" . _hx_string_rec($i->lineNumber, "") . ":" . _hx_string_or_null($i->methodName) . ":";
     } else {
         $msg = "";
     }
     $msg .= Std::string($v);
     $http = new haxe_Http("http://localhost/devel/php/jsLog.php");
     $http->setParameter("log", $msg);
     $http->onData = array(new _hx_lambda(array(&$http, &$i, &$msg, &$v), "me_cunity_debug_Out_0"), 'execute');
     $http->request(true);
 }
Example #2
0
 public function external_status($param)
 {
     $status = $param->get("dispo");
     $url = "http://xpress.mein-dialer.com/agc/api.php?source=flyCRM&user="******"&pass="******"&function=external_status&value=" . _hx_string_or_null($status) . "&agent_user="******"agent_user"));
     haxe_Log::trace($url, _hx_anonymous(array("fileName" => "AgcApi.hx", "lineNumber" => 71, "className" => "model.AgcApi", "methodName" => "external_status")));
     $agcResponse = haxe_Http::requestUrl($url);
     return $this->json_response(_hx_index_of($agcResponse, "SUCCESS", null) === 0 ? "OK" : $agcResponse);
 }
 public function request($post)
 {
     $proxy = $this->getProxy();
     if ($proxy !== null && $proxy->host !== null && strlen($proxy->host) > 0) {
         $hpa = $proxy->auth;
         if ($hpa->user !== null && strlen($hpa->user) > 0) {
             $data = _hx_deref(new com_wiris_system_Base64())->encodeBytes(haxe_io_Bytes::ofString($hpa->user . ":" . $hpa->pass))->toString();
             $this->setHeader("Proxy-Authorization", "Basic " . $data);
         }
     }
     parent::request($post);
 }
Example #4
0
 static function requestUrl($url)
 {
     $h = new haxe_Http($url);
     $r = null;
     $h->onData = array(new _hx_lambda(array(&$h, &$r, &$url), "haxe_Http_6"), 'execute');
     $h->onError = array(new _hx_lambda(array(&$h, &$r, &$url), "haxe_Http_7"), 'execute');
     $h->request(false);
     return $r;
 }