<?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>access &#8211; SMsoft &#8211; informatica e dintorni</title>
	<atom:link href="https://blog.smsoft.it/tag/access/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.smsoft.it</link>
	<description>consigli settimanali su MacOS, GNU/Linux ed Open Source</description>
	<lastBuildDate>Tue, 06 Jun 2017 08:30:21 +0000</lastBuildDate>
	<language>it-IT</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=61537</generator>
	<item>
		<title>Come creare un file di log tipo Apache in PHP</title>
		<link>https://blog.smsoft.it/2017/06/06/creare-un-file-log-tipo-apache-php/</link>
					<comments>https://blog.smsoft.it/2017/06/06/creare-un-file-log-tipo-apache-php/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 06 Jun 2017 08:30:21 +0000</pubDate>
				<category><![CDATA[Html e PHP]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[log]]></category>
		<category><![CDATA[php]]></category>
		<guid isPermaLink="false">https://blog.smsoft.it/?p=3732</guid>

					<description><![CDATA[In alcuni casi potrebbe non essere possibile accedere ai files di log di apache ma sarebbe utile per capire le richieste ricevute dal sito. Se il nostro sito è in PHP, è possibile usare un piccolo snippet per simulare questa funzionalità. Basta aggiungere all&#8217;inizio del file index.php (quello che visualizza i contenuti del sito), il ... <a title="Come creare un file di log tipo Apache in PHP" class="read-more" href="https://blog.smsoft.it/2017/06/06/creare-un-file-log-tipo-apache-php/" aria-label="Per saperne di più su Come creare un file di log tipo Apache in PHP">Leggi tutto</a>]]></description>
										<content:encoded><![CDATA[<p>In alcuni casi potrebbe non essere possibile accedere ai files di log di apache ma sarebbe utile per capire le richieste ricevute dal sito. Se il nostro sito è in PHP, è possibile usare un piccolo snippet per simulare questa funzionalità.</p>
<p>Basta aggiungere all&#8217;inizio del file index.php (quello che visualizza i contenuti del sito), il seguente codice:<br />
<code>$log = fopen(".access.log.txt","a");<br />
fwrite($log,getenv("REMOTE_ADDR")." - - ".date(DATE_ATOM)." ".getenv("REQUEST_URI")." ".getenv("HTTP_USER_AGENT")." ".getenv("HTTP_REFERER")."\n");<br />
fclose($log);<br />
chmod(".access.log.txt", 0600);</code></p>
<p>ATTENZIONE: il file può diventare molto grande nel caso il sito abbia tanti accessi, consiglio quindi di usare questa funzionalità solo per <strong>brevi periodi</strong> di debug.</p>
<p>enjoy!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.smsoft.it/2017/06/06/creare-un-file-log-tipo-apache-php/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
