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