<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Write to a log file with PHP</title>
	<atom:link href="http://www.redips.net/php/write-to-log-file/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.redips.net/php/write-to-log-file/</link>
	<description>Techniques and Web Technologies</description>
	<lastBuildDate>Sun, 05 Sep 2010 09:16:53 +0200</lastBuildDate>
	
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: asartalo</title>
		<link>http://www.redips.net/php/write-to-log-file/comment-page-1/#comment-2032</link>
		<dc:creator>asartalo</dc:creator>
		<pubDate>Wed, 02 Jun 2010 15:42:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.redips.net/?p=36#comment-2032</guid>
		<description>Nice script! I&#039;ve modified your logger class so that I can pass a different log file to use in the constructor. Thanks for sharing!</description>
		<content:encoded><![CDATA[<p>Nice script! I've modified your logger class so that I can pass a different log file to use in the constructor. Thanks for sharing!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dbunic</title>
		<link>http://www.redips.net/php/write-to-log-file/comment-page-1/#comment-1994</link>
		<dc:creator>dbunic</dc:creator>
		<pubDate>Tue, 25 May 2010 10:36:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.redips.net/?p=36#comment-1994</guid>
		<description>This is simple function and only one line is written per logging so I assume that concurrency (file locking) wasn&#039;t needed in such case. Anyway, PHP has &lt;a href=&quot;http://php.net/manual/en/function.flock.php&quot; title=&quot;PHP: flock - Portable advisory file locking&quot; rel=&quot;nofollow&quot;&gt;flock&lt;/a&gt; function and is possible to extend Logging class to support file locking. And about file_put_contents ... You&#039;re probably right, but &lt;a href=&quot;http://php.net/manual/en/function.file-put-contents.php&quot; title=&quot;PHP: file_put_contents - Write a string to a file&quot; rel=&quot;nofollow&quot;&gt;file_put_contents&lt;/a&gt; is available since PHP5 so this will not work on PHP4 engines - on the other hand, who still uses PHP4 ;)</description>
		<content:encoded><![CDATA[<p>This is simple function and only one line is written per logging so I assume that concurrency (file locking) wasn't needed in such case. Anyway, PHP has <a href="http://php.net/manual/en/function.flock.php" title="PHP: flock - Portable advisory file locking" rel="nofollow">flock</a> function and is possible to extend Logging class to support file locking. And about file_put_contents ... You're probably right, but <a href="http://php.net/manual/en/function.file-put-contents.php" title="PHP: file_put_contents - Write a string to a file" rel="nofollow">file_put_contents</a> is available since PHP5 so this will not work on PHP4 engines - on the other hand, who still uses PHP4 <img src='http://www.redips.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dynamic CSS</title>
		<link>http://www.redips.net/php/write-to-log-file/comment-page-1/#comment-1992</link>
		<dc:creator>Dynamic CSS</dc:creator>
		<pubDate>Tue, 25 May 2010 03:34:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.redips.net/?p=36#comment-1992</guid>
		<description>Thanks for sharing. Though couple questions. Do you run in any concurency issues? Shoul&#039;d you lock the file? (Not sure how it is done with PHP). Also, isn&#039;t similar can be achieved simply by using 
file_put_contents function?</description>
		<content:encoded><![CDATA[<p>Thanks for sharing. Though couple questions. Do you run in any concurency issues? Shoul'd you lock the file? (Not sure how it is done with PHP). Also, isn't similar can be achieved simply by using<br />
file_put_contents function?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fred</title>
		<link>http://www.redips.net/php/write-to-log-file/comment-page-1/#comment-1933</link>
		<dc:creator>fred</dc:creator>
		<pubDate>Mon, 26 Apr 2010 15:12:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.redips.net/?p=36#comment-1933</guid>
		<description>wow, great job, thank you for publishing this</description>
		<content:encoded><![CDATA[<p>wow, great job, thank you for publishing this</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aravin</title>
		<link>http://www.redips.net/php/write-to-log-file/comment-page-1/#comment-1828</link>
		<dc:creator>aravin</dc:creator>
		<pubDate>Mon, 08 Mar 2010 14:56:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.redips.net/?p=36#comment-1828</guid>
		<description>hello, i&#039;m still beginner in php. i want my php to use data in log file and filter it on linux platform. For example i want my php to take data in log file in my honeypot. then the raw data will be filter into certain category. can anybody help me because i need to use it into my project.</description>
		<content:encoded><![CDATA[<p>hello, i'm still beginner in php. i want my php to use data in log file and filter it on linux platform. For example i want my php to take data in log file in my honeypot. then the raw data will be filter into certain category. can anybody help me because i need to use it into my project.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dbunic</title>
		<link>http://www.redips.net/php/write-to-log-file/comment-page-1/#comment-1787</link>
		<dc:creator>dbunic</dc:creator>
		<pubDate>Mon, 15 Feb 2010 11:16:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.redips.net/?p=36#comment-1787</guid>
		<description>@Abhishek - My intention was to write log PHP output to the ordinary file and to read it with text editor (like vi). But if you want to read log file with browser - you can modify PHP script to wrap lines with &lt;span style=&quot;color:red&quot;&gt;&lt;/span&gt; ... This lines will be red.</description>
		<content:encoded><![CDATA[<p>@Abhishek - My intention was to write log PHP output to the ordinary file and to read it with text editor (like vi). But if you want to read log file with browser - you can modify PHP script to wrap lines with &lt;span style="color:red"&gt;&lt;/span&gt; ... This lines will be red.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Abhishek</title>
		<link>http://www.redips.net/php/write-to-log-file/comment-page-1/#comment-1785</link>
		<dc:creator>Abhishek</dc:creator>
		<pubDate>Mon, 15 Feb 2010 06:59:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.redips.net/?p=36#comment-1785</guid>
		<description>This is very nice!!
Now I want to put the error lines in red colour should it be possible?</description>
		<content:encoded><![CDATA[<p>This is very nice!!<br />
Now I want to put the error lines in red colour should it be possible?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dbunic</title>
		<link>http://www.redips.net/php/write-to-log-file/comment-page-1/#comment-1615</link>
		<dc:creator>dbunic</dc:creator>
		<pubDate>Tue, 01 Dec 2009 13:50:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.redips.net/?p=36#comment-1615</guid>
		<description>@viettel - Yes you can read any file with PHP if you have read permissions. Please be aware that &lt;em&gt;access_log&lt;/em&gt; can be huge (like 100MB or more) and reading / processing will be resource intensive task.</description>
		<content:encoded><![CDATA[<p>@viettel - Yes you can read any file with PHP if you have read permissions. Please be aware that <em>access_log</em> can be huge (like 100MB or more) and reading / processing will be resource intensive task.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: viettel</title>
		<link>http://www.redips.net/php/write-to-log-file/comment-page-1/#comment-1610</link>
		<dc:creator>viettel</dc:creator>
		<pubDate>Tue, 01 Dec 2009 05:19:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.redips.net/?p=36#comment-1610</guid>
		<description>can i read a log file created by a web serve?</description>
		<content:encoded><![CDATA[<p>can i read a log file created by a web serve?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fladi</title>
		<link>http://www.redips.net/php/write-to-log-file/comment-page-1/#comment-1400</link>
		<dc:creator>Fladi</dc:creator>
		<pubDate>Mon, 26 Oct 2009 11:04:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.redips.net/?p=36#comment-1400</guid>
		<description>Hi! thanks for shareing this class. Exactely what I was looking for.</description>
		<content:encoded><![CDATA[<p>Hi! thanks for shareing this class. Exactely what I was looking for.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
