<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Snipplr</title>
    <description>Recent snippets posted on Snipplr.com</description>
    <link>https://snipplr.com/</link>
    <lastBuildDate>Tue, 09 Jun 2026 13:31:07 +0000</lastBuildDate>
    <item>
      <title>(PHP) php-log - Process log files with PHP - dom111</title>
      <link>https://snipplr.com/view/40524/phplog--process-log-files-with-php</link>
      <description>&lt;p&gt;Iâ€™ve recently had to quickly parse an Apache log file, to get basic usage statistics for a site over a month and wanted the ability to quickly process any general logs and store them in a MySQL table, so Iâ€™ve made a small package class.log.&#13;
&#13;
Included in the package are:&#13;
&#13;
class.log.php (the main class)&#13;
class.log.processor.php (an interface for a log processor, very basic!!)&#13;
class.log.output.php (a simple extension of the processor (outputs &lt;p&gt; tags with &lt;span&gt;s)&#13;
class.log.mysql.php (a simple mysql importer of the processed data)&#13;
parse.php (a simple implementation, bringing all the classes together)&#13;
The class is designed to use one line at a time from the log retrieved, and the regular expression specified in class.log.php can be modified to parse different types of logs as long as the matches array is also updated.&#13;
&#13;
Iâ€™ve only used this for apache logs currently, which it managed quite well, Iâ€™m not sure if Iâ€™d use this script in an automated script, but Iâ€™ll leave that for you to decide.&lt;/p&gt;</description>
      <pubDate>Wed, 15 Sep 2010 20:07:44 UTC</pubDate>
      <guid>https://snipplr.com/view/40524/phplog--process-log-files-with-php</guid>
    </item>
    <item>
      <title>(PHP) chunk - Break A Large XML File Into Manageable Chunks - dom111</title>
      <link>https://snipplr.com/view/40523/chunk--break-a-large-xml-file-into-manageable-chunks</link>
      <description>&lt;p&gt;Iâ€™ve recently had to parse some pretty large XML documents, and needed a method to read one element at a time.&#13;
&#13;
Hereâ€™s a fairly simple solution in PHP.&lt;/p&gt;</description>
      <pubDate>Wed, 15 Sep 2010 20:02:15 UTC</pubDate>
      <guid>https://snipplr.com/view/40523/chunk--break-a-large-xml-file-into-manageable-chunks</guid>
    </item>
    <item>
      <title>(PHP) Object Oriented Image Manipulation - dom111</title>
      <link>https://snipplr.com/view/40519/object-oriented-image-manipulation</link>
      <description>&lt;p&gt;Iâ€™ve been working on a CMS lately and having to create thumbnails for uploaded images is always a pain, lots of maths working out the correct sizes and such, so Iâ€™ve created a fairly small script to manipulate images in an object-oriented style.&lt;/p&gt;</description>
      <pubDate>Wed, 15 Sep 2010 19:54:04 UTC</pubDate>
      <guid>https://snipplr.com/view/40519/object-oriented-image-manipulation</guid>
    </item>
    <item>
      <title>(PHP) xmlentnties and xml_entitiy_decode - dom111</title>
      <link>https://snipplr.com/view/28349/xmlentnties-and-xmlentitiydecode</link>
      <description>&lt;p&gt;Because htmlentities just doesn't cut it.&#13;
&#13;
Recently needed this to work with 3rd part software, ended up having to make it pretty robust so thought I'd share!&lt;/p&gt;</description>
      <pubDate>Mon, 15 Feb 2010 15:44:12 UTC</pubDate>
      <guid>https://snipplr.com/view/28349/xmlentnties-and-xmlentitiydecode</guid>
    </item>
    <item>
      <title>(PHP) PHP - Lightweight Database and Rowset class, ActiveRecord style functions - dom111</title>
      <link>https://snipplr.com/view/7468/php--lightweight-database-and-rowset-class-activerecord-style-functions</link>
      <description>&lt;p&gt;Been wanting to made one of these for a while and finally I got round to it.&#13;
&#13;
For some examples please visit the post:&#13;
http://www.dom111.co.uk/blog/coding/db/8&#13;
&#13;
Any comments suggestions appreciated.&#13;
CreativeCommons ShareAlike&lt;/p&gt;</description>
      <pubDate>Wed, 23 Jul 2008 18:59:13 UTC</pubDate>
      <guid>https://snipplr.com/view/7468/php--lightweight-database-and-rowset-class-activerecord-style-functions</guid>
    </item>
  </channel>
</rss>
