3 require_once('init.php');
4 require_once('cmd.php');
6 // handle http proxy when using file_get_contents
7 if (CONST_HTTP_Proxy) {
8 $proxy = 'tcp://' . CONST_HTTP_Proxy_Host . ':' . CONST_HTTP_Proxy_Port;
10 if(CONST_HTTP_Proxy_Login != null && CONST_HTTP_Proxy_Login != '' && CONST_HTTP_Proxy_Password != null && CONST_HTTP_Proxy_Password != '') {
11 $auth = base64_encode(CONST_HTTP_Proxy_Login . ':' . CONST_HTTP_Proxy_Password);
12 $aHeaders = array("Proxy-Authorization: Basic $auth");
17 'request_fulluri' => true,
22 'request_fulluri' => true,
26 stream_context_set_default($aContext);