note 107523 added to function.stream-context-set-default

From: Date: Wed, 15 Feb 2012 08:58:22 +0000
Subject: note 107523 added to function.stream-context-set-default
Groups: php.notes 
Request: Send a blank email to php-notes+get-186142@lists.php.net to get a copy of this message
<?php //Code snippet taken from // http://stackoverflow.com/questions/1336262/file-get-contents-behind-a-proxy php $auth = base64_encode('LOGIN:PASSWORD'); $aContext = array( 'http' => array( 'proxy' => 'tcp://192.168.0.2:3128', 'request_fulluri' => true, 'header' => "Proxy-Authorization: Basic $auth", ), ); stream_context_set_default($aContext); $sFile = file_get_contents("http://www.google.com", False); echo $sFile; ?> ---- Server IP: 69.147.83.197 Probable Submitter: 80.64.32.11 ---- Manual Page -- http://www.php.net/manual/en/function.stream-context-set-default.php Edit -- https://master.php.net/note/edit/107523 Del: integrated -- https://master.php.net/note/delete/107523/integrated Del: useless -- https://master.php.net/note/delete/107523/useless Del: bad code -- https://master.php.net/note/delete/107523/bad+code Del: spam -- https://master.php.net/note/delete/107523/spam Del: non-english -- https://master.php.net/note/delete/107523/non-english Del: in docs -- https://master.php.net/note/delete/107523/in+docs Del: other reasons-- https://master.php.net/note/delete/107523 Reject -- https://master.php.net/note/reject/107523 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#186142) next »