note 72086 added to function.stream-context-get-default
| From: | RQuadling at GMail dot com | Date: | Tue, 02 Jan 2007 09:02:46 +0000 |
| Subject: | note 72086 added to function.stream-context-get-default | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-121182@lists.php.net to get a copy of this message | ||
If you are using stream_context_get_default() and are still finding that some functions do not work,
make sure that they are not based upon the libxml functions (DOM, SimpleXML and XSLT). These require
their own context.
You can easily set them using the following code ...
<?php
// Define the default, system-wide context.
$r_default_context = stream_context_get_default
(
array
(
'http' => array
( // All HTTP requests are passed through the local NTLM proxy server on port 8080.
'proxy' => 'tcp://127.0.0.1:8080',
'request_fulluri' => True,
),
)
);
// Though we said system wide, some extensions need a little coaxing.
libxml_set_streams_context($r_default_context);
?>
See http://rquadling.php1h.com/php_ntlm.php
for more info (sorry for the ads).
----
Server IP: 66.163.161.117
Probable Submitter: 83.104.121.66 (proxied: 1.1 BANDEXCH)
----
Manual Page -- http://www.php.net/manual/en/function.stream-context-get-default.php
Edit -- https://master.php.net/note/edit/72086
Del: integrated -- https://master.php.net/note/delete/72086/integrated
Del: useless -- https://master.php.net/note/delete/72086/useless
Del: bad code -- https://master.php.net/note/delete/72086/bad+code
Del: spam -- https://master.php.net/note/delete/72086/spam
Del: non-english -- https://master.php.net/note/delete/72086/non-english
Del: in docs -- https://master.php.net/note/delete/72086/in+docs
Del: other reasons-- https://master.php.net/note/delete/72086
Reject -- https://master.php.net/note/reject/72086
Search -- https://master.php.net/manage/user-notes.php