<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>(function() { &#187; websense</title>
	<atom:link href="http://maxb.net/blog/tag/websense/feed/" rel="self" type="application/rss+xml" />
	<link>http://maxb.net/blog</link>
	<description>// MAXB.NET LABS</description>
	<lastBuildDate>Wed, 01 Sep 2010 08:24:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Proxy php vs Websense</title>
		<link>http://maxb.net/blog/2008/06/10/proxy-php-vs-websense/</link>
		<comments>http://maxb.net/blog/2008/06/10/proxy-php-vs-websense/#comments</comments>
		<pubDate>Tue, 10 Jun 2008 15:09:32 +0000</pubDate>
		<dc:creator>Massimiliano Balestrieri</dc:creator>
				<category><![CDATA[hack]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[dilbert]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[websense]]></category>

		<guid isPermaLink="false">http://maxb.net/blog/?p=65</guid>
		<description><![CDATA[Se siete in una intranet e avete un proxy aziendale malefico tipo websense potreste avere problemi di cache oltre che di contenuto proibito! Ecco come nel mio wiki aziendale riesco a prendere il feed di dilbert (la mia vignetta quotidiana di dilbert era ferma al 10 Maggio!): * chiaramente questo proxy è implementato per trasmettere [...]]]></description>
			<content:encoded><![CDATA[<p>Se siete in una intranet e avete un proxy aziendale malefico tipo websense potreste avere problemi di cache oltre che di contenuto proibito!</p>
<p>Ecco come nel mio wiki aziendale riesco a prendere il feed di dilbert (la mia vignetta quotidiana di dilbert era ferma al 10 Maggio!):</p>
<p>* chiaramente questo proxy è implementato per trasmettere feed xml. non altro.</p>
<pre><code class="php">
header('Pragma: public');
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");                  // Date in the past
header('Last-Modified: '.gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');     // HTTP/1.1
header('Cache-Control: pre-check=0, post-check=0, max-age=0');    // HTTP/1.1

header ("content-type: text/xml");

$params = array (
    'http' =&gt; array (
        'proxy' =&gt; 'tcp://proxy.azienda.it:80', // This needs to be the server and the port of the NTLM Authentication Proxy Server.
        'request_fulluri' =&gt; true,
        'header' =&gt; 'Cache-Control: no-store, no-cache, must-revalidate',
    )
);

$ctx = stream_context_create($params);
if(isset($_REQUEST['url'])){
    $url = $_REQUEST['url'];
    echo file_get_contents($url, false, $ctx);
}else{
    echo '&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;nodata&gt;1&lt;/nodata&gt;';
}

exit ();
</code></pre>
<p><a href="http://maxb.net/blog/wp-content/uploads/2008/06/8713stripprint.gif"><img class="aligncenter size-full wp-image-66" title="8713stripprint" src="http://maxb.net/blog/wp-content/uploads/2008/06/8713stripprint.gif" alt="" /></a></p>
<img src="http://maxb.net/blog/?ak_action=api_record_view&id=65&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://maxb.net/blog/2008/06/10/proxy-php-vs-websense/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
