Re: [PHP] CLI behind proxy

2010-02-04 Thread Richard Quadling
On 4 February 2010 15:27, kranthi  wrote:
> stream_socket_client("tcp://talk.google.com:5222")
> i m trying to use http://code.google.com/p/xmpphp/ actually
>

Does your proxy pass through all requests?

It might be easier to just set you NIC gateway to the proxy.

We stopped using ISA server with NTLM authentication.

Now, the gateway for my machine is the ISA server, so all requests go
through there automatically and we use AD for authentication.



-- 
-
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] CLI behind proxy

2010-02-04 Thread kranthi
stream_socket_client("tcp://talk.google.com:5222")
i m trying to use http://code.google.com/p/xmpphp/ actually

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] CLI behind proxy

2010-02-04 Thread Richard Quadling
On 4 February 2010 14:38, Richard Quadling  wrote:
> On 4 February 2010 14:19, kranthi  wrote:
>> fsockopen
>
> What type of socket are you opening?
>
> --
> -
> Richard Quadling
> "Standing on the shoulders of some very clever giants!"
> EE : http://www.experts-exchange.com/M_248814.html
> EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
> Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
> ZOPA : http://uk.zopa.com/member/RQuadling
>

The code puts HTTP requests through the context.



-- 
-
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] CLI behind proxy

2010-02-04 Thread Richard Quadling
On 4 February 2010 14:19, kranthi  wrote:
> fsockopen

What type of socket are you opening?

-- 
-
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] CLI behind proxy

2010-02-04 Thread kranthi
I did'nt understand completely. But I noticed that if i do

$opts = array('http' => array('proxy' => 'tcp://10.3.100.212:8080',
'request_fulluri' => true));
$context = stream_context_set_default($opts);

fopen, file_get_contents, etc. are working fine, but fsockopen is not

KK.


Re: [PHP] CLI behind proxy

2010-02-04 Thread Richard Quadling
On 4 February 2010 12:48, kranthi  wrote:
> Hi all,
>
> I want to run fsockopen etc behind a proxy.
> proxychains (http://proxychains.sourceforge.net/) may be helpful,
> unfortunately the support for that is pretty bad. Please inform me of other
> alternatives
>
> KK.
>

I used to use a proxy written in Python which provided the client NTLM
authentication to our ISA server for PHP.

So, PHP script talked to NTLM Authentication Proxy Server which talked
to ISA which talked to the outside world.

Worked fine.

The only thing I needed to do in PHP was setup a default context and
all my normal file_get_contents(),etc. which needed to communicate
through to the outside world worked fine.

Here is the code I used ...

// 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);



So, set the proxy tcp address appropriately, put this code in a global
include file (maybe via the auto_prepend_file= ini file setting) and
see how you go.



-- 
-
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] CLI behind proxy

2010-02-04 Thread kranthi
Hi all,

I want to run fsockopen etc behind a proxy.
proxychains (http://proxychains.sourceforge.net/) may be helpful,
unfortunately the support for that is pretty bad. Please inform me of other
alternatives

KK.