httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <rainer.j...@kippdata.de>
Subject Re: [users@httpd] Configure Apache behind proxy with auth [wd-vc]
Date Fri, 16 Oct 2015 19:35:25 GMT
Am 16.10.2015 um 15:08 schrieb Lucas Santos Sanches:
> using cUrl
>
> here is
>
> $curl = curl_init();
> curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
> curl_setopt($curl, CURLOPT_URL, $url);
> curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
> curl_setopt($curl, CURLOPT_TIMEOUT, $curl_timeout);
> curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);

Look for "proxy" in http://php.net/manual/en/function.curl-setopt.php

> if ($stream_context != null)
> {
> $opts = stream_context_get_options($stream_context);
> if (isset($opts['http']['method']) &&
> Tools::strtolower($opts['http']['method']) == 'post')
> {
> curl_setopt($curl, CURLOPT_POST, true);
> if (isset($opts['http']['content']))
> {
> parse_str($opts['http']['content'], $post_data);
> curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
> }
> }
> }
> $content = curl_exec($curl);
> curl_close($curl);
> return $content;
> }

Regards,

Rainer


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message