array( 'method' => 'GET', 'timeout' => '5', 'user_agent' => 'PHP libxml agent', 'ignore_errors' => true, ) ); $options['http']['proxy'] = 'tcp://'.$proxy_host; $options['http']['request_fulluri'] = TRUE; $proxy_userpwd = PROXY_USERPWD; if (!empty($proxy_userpwd)) { $options['http']['header'] = "Proxy-Authorization: Basic ".base64_encode($proxy_userpwd); } return stream_context_create($options); } } ?>