...

View Full Version : php and proxy



kranthi117
01-07-2008, 01:27 PM
i want to use a http proxy to connect to the internet via php

<?php
$context = stream_context_create(
array('http'=>
array('proxy'=>'http://proxy.example.com:5100')
));

$contents = file_get_contents('http://www.somesite.com/pat/to/file',
false, $context);
?>
this is all what i need except that it gives the following error

Unable to find the socket transport "http" - did you forget to enable it when you configured PHP?

but i want to use a proxy every time i connect to the internet
for example i want to use http://magpierss.sourceforge.net/ via a proxy

moreover i want to use a socks proxy along with mail function to bypass my ISP's firewall which blocks port 25
awaiting reply



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum