Re: Can php be configured to browse through a proxy?
| From: | Matijn Woudt | Date: | Tue, 14 Feb 2012 16:58:51 +0000 |
| Subject: | Re: Can php be configured to browse through a proxy? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-316603@lists.php.net to get a copy of this message | ||
On Tue, Feb 14, 2012 at 5:41 PM, Joan <aseques@gmail.com> wrote:
> There is some information about configuring php to use a proxy when
> connecting to external urls.
>
> According to some sources the proper setup option is by using
> the stream-context-set-default function (
>
> http://www.php.net/manual/en/function.stream-context-set-default.php)
> Still I have not been able to find any reference about if it can be set on
> php.ini (so all the instances of php use it)
>
> Also there is this bug that has been assigned since 2010 and still have not
> changed (29280)
> https://bugs.php.net/bug.php?id=29280
>
> Any information about this will be well received.
>
> Thanks,
>
> Joan
Hi,
AFAIK there's no such setting in php.ini. If you want to have it set
allways, you could use the php.ini setting auto_prepend_file to run a
simple php script (containing stream_context_set_default) before each
php file is parsed.
- Matijn