<?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 12:09:25 +0000</lastBuildDate>
    <item>
      <title>(PHP) PHP - Relative date function (2 minutes ago, 3 days ago...) - LuckyShot</title>
      <link>https://snipplr.com/view/35635/php--relative-date-function-2-minutes-ago-3-days-ago</link>
      <description>&lt;p&gt;Gets seconds and returns it like Facebook/Twitter style: "2 minutes ago", "9 hours ago", etc...&#13;
The script actually returns "1 minute", "17 days"... so that you can customize it: "3 seconds ago", "in 1 minute", "will take 4 days", etc.&lt;/p&gt;</description>
      <pubDate>Wed, 09 Jun 2010 18:07:41 UTC</pubDate>
      <guid>https://snipplr.com/view/35635/php--relative-date-function-2-minutes-ago-3-days-ago</guid>
    </item>
    <item>
      <title>(PHP) PHP simple benchmarking - LuckyShot</title>
      <link>https://snipplr.com/view/35295/php-simple-benchmarking</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Fri, 28 May 2010 08:14:22 UTC</pubDate>
      <guid>https://snipplr.com/view/35295/php-simple-benchmarking</guid>
    </item>
    <item>
      <title>(PHP) PHP/MySQL - Database Class - LuckyShot</title>
      <link>https://snipplr.com/view/34289/phpmysql--database-class</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 12 May 2010 11:50:46 UTC</pubDate>
      <guid>https://snipplr.com/view/34289/phpmysql--database-class</guid>
    </item>
    <item>
      <title>(PHP) JavaScript/jQuery simple benchmarking - LuckyShot</title>
      <link>https://snipplr.com/view/32069/javascriptjquery-simple-benchmarking</link>
      <description>&lt;p&gt;Disable Firebug and plugins, close other tabs and close other programs for more accurate results!&lt;/p&gt;</description>
      <pubDate>Thu, 15 Apr 2010 11:36:55 UTC</pubDate>
      <guid>https://snipplr.com/view/32069/javascriptjquery-simple-benchmarking</guid>
    </item>
    <item>
      <title>(PHP) Twitter - Print latest tweet from user (extracts from RSS feed in PHP and linkifies links) - LuckyShot</title>
      <link>https://snipplr.com/view/31106/twitter--print-latest-tweet-from-user-extracts-from-rss-feed-in-php-and-linkifies-links</link>
      <description>&lt;p&gt;Extracts the most recent tweet from the users RSS feed and auto-detects links.&lt;/p&gt;</description>
      <pubDate>Thu, 08 Apr 2010 09:07:09 UTC</pubDate>
      <guid>https://snipplr.com/view/31106/twitter--print-latest-tweet-from-user-extracts-from-rss-feed-in-php-and-linkifies-links</guid>
    </item>
    <item>
      <title>(PHP) Wordpress - Get current page ID (and other default variables) - LuckyShot</title>
      <link>https://snipplr.com/view/30512/wordpress--get-current-page-id-and-other-default-variables</link>
      <description>&lt;p&gt;Variables not dependant on the loop, can be used as GET params&lt;/p&gt;</description>
      <pubDate>Tue, 30 Mar 2010 06:15:28 UTC</pubDate>
      <guid>https://snipplr.com/view/30512/wordpress--get-current-page-id-and-other-default-variables</guid>
    </item>
    <item>
      <title>(PHP) Bayesian Rating - Weighted voted rating system - LuckyShot</title>
      <link>https://snipplr.com/view/29775/bayesian-rating--weighted-voted-rating-system</link>
      <description>&lt;p&gt;Bayesian Rating is using the Bayesian Average. This is a mathematical term that calculates a rating of an item based on the â€œbelievabilityâ€ of the votes. The greater the certainty based on the number of votes, the more the Bayesian rating approximates the plain, unweighted rating. When there are very few votes, the bayesian rating of an item will be closer to the average rating of all items.&lt;/p&gt;</description>
      <pubDate>Mon, 15 Mar 2010 08:06:17 UTC</pubDate>
      <guid>https://snipplr.com/view/29775/bayesian-rating--weighted-voted-rating-system</guid>
    </item>
    <item>
      <title>(PHP) Print the permanent URL of a post based on the ID - LuckyShot</title>
      <link>https://snipplr.com/view/28912/print-the-permanent-url-of-a-post-based-on-the-id</link>
      <description>&lt;p&gt;Where 123 is the post/page ID.&lt;/p&gt;</description>
      <pubDate>Thu, 25 Feb 2010 10:35:54 UTC</pubDate>
      <guid>https://snipplr.com/view/28912/print-the-permanent-url-of-a-post-based-on-the-id</guid>
    </item>
    <item>
      <title>(PHP) Wordpress - Check if child page belongs to parent page - LuckyShot</title>
      <link>https://snipplr.com/view/26505/wordpress--check-if-child-page-belongs-to-parent-page</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Fri, 15 Jan 2010 08:05:42 UTC</pubDate>
      <guid>https://snipplr.com/view/26505/wordpress--check-if-child-page-belongs-to-parent-page</guid>
    </item>
    <item>
      <title>(PHP) PHP - Nice Multidimensional Array - LuckyShot</title>
      <link>https://snipplr.com/view/24861/php--nice-multidimensional-array</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 15 Dec 2009 19:54:31 UTC</pubDate>
      <guid>https://snipplr.com/view/24861/php--nice-multidimensional-array</guid>
    </item>
    <item>
      <title>(PHP) Wordpress - Get template file used - LuckyShot</title>
      <link>https://snipplr.com/view/24406/wordpress--get-template-file-used</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Mon, 07 Dec 2009 04:54:14 UTC</pubDate>
      <guid>https://snipplr.com/view/24406/wordpress--get-template-file-used</guid>
    </item>
    <item>
      <title>(PHP) Wordpress - Check if posts belongs to a category - LuckyShot</title>
      <link>https://snipplr.com/view/24403/wordpress--check-if-posts-belongs-to-a-category</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Mon, 07 Dec 2009 04:50:18 UTC</pubDate>
      <guid>https://snipplr.com/view/24403/wordpress--check-if-posts-belongs-to-a-category</guid>
    </item>
    <item>
      <title>(PHP) PHP Error reporting - LuckyShot</title>
      <link>https://snipplr.com/view/24135/php-error-reporting</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 02 Dec 2009 06:00:50 UTC</pubDate>
      <guid>https://snipplr.com/view/24135/php-error-reporting</guid>
    </item>
    <item>
      <title>(PHP) Wordpress - Get first image of post (without Custom Fields) - LuckyShot</title>
      <link>https://snipplr.com/view/23968/wordpress--get-first-image-of-post-without-custom-fields</link>
      <description>&lt;p&gt;To call it just put &lt;?php&gt; in your template file within the loop.&lt;/p&gt;</description>
      <pubDate>Tue, 01 Dec 2009 05:35:20 UTC</pubDate>
      <guid>https://snipplr.com/view/23968/wordpress--get-first-image-of-post-without-custom-fields</guid>
    </item>
    <item>
      <title>(PHP) Wordpress - Accurate Trim text function - LuckyShot</title>
      <link>https://snipplr.com/view/23967/wordpress--accurate-trim-text-function</link>
      <description>&lt;p&gt;Add to your functions.php in the active template. &#13;
&#13;
Remove commented text. Fat/Thin char detection still not implemented. I'll update it as soon as I get some time. If you come with it please let me know :)&lt;/p&gt;</description>
      <pubDate>Tue, 01 Dec 2009 05:30:58 UTC</pubDate>
      <guid>https://snipplr.com/view/23967/wordpress--accurate-trim-text-function</guid>
    </item>
    <item>
      <title>(PHP) Wordpress - Include PHP file from template folder - LuckyShot</title>
      <link>https://snipplr.com/view/23966/wordpress--include-php-file-from-template-folder</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 01 Dec 2009 05:28:04 UTC</pubDate>
      <guid>https://snipplr.com/view/23966/wordpress--include-php-file-from-template-folder</guid>
    </item>
    <item>
      <title>(PHP) Wordpress - Image resized with TimThumb - LuckyShot</title>
      <link>https://snipplr.com/view/23963/wordpress--image-resized-with-timthumb</link>
      <description>&lt;p&gt;TimThumb should be in the template folder named as "thumb.php".&#13;
Change H (height in px), W (width in px), Q (quality 0-100), ZC (zoom cropping 0-1) values. &#13;
You can provide only one of the dimensions of the picture to get a proportional scale.&lt;/p&gt;</description>
      <pubDate>Tue, 01 Dec 2009 05:19:49 UTC</pubDate>
      <guid>https://snipplr.com/view/23963/wordpress--image-resized-with-timthumb</guid>
    </item>
    <item>
      <title>(PHP) Wordpress - Custom loop SQL query (and Popular Posts example) - LuckyShot</title>
      <link>https://snipplr.com/view/23959/wordpress--custom-loop-sql-query-and-popular-posts-example</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 01 Dec 2009 04:22:50 UTC</pubDate>
      <guid>https://snipplr.com/view/23959/wordpress--custom-loop-sql-query-and-popular-posts-example</guid>
    </item>
    <item>
      <title>(PHP) Wordpress - Total number of posts in a category - LuckyShot</title>
      <link>https://snipplr.com/view/23262/wordpress--total-number-of-posts-in-a-category</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 17 Nov 2009 05:39:41 UTC</pubDate>
      <guid>https://snipplr.com/view/23262/wordpress--total-number-of-posts-in-a-category</guid>
    </item>
    <item>
      <title>(PHP) Wordpress - Custom loop - LuckyShot</title>
      <link>https://snipplr.com/view/21489/wordpress--custom-loop</link>
      <description>&lt;p&gt;Creates custom loop to avoid interfeering with the loop of the page&lt;/p&gt;</description>
      <pubDate>Tue, 20 Oct 2009 05:28:13 UTC</pubDate>
      <guid>https://snipplr.com/view/21489/wordpress--custom-loop</guid>
    </item>
    <item>
      <title>(PHP) Wordpress - Custom Field - LuckyShot</title>
      <link>https://snipplr.com/view/21483/wordpress--custom-field</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 20 Oct 2009 04:06:46 UTC</pubDate>
      <guid>https://snipplr.com/view/21483/wordpress--custom-field</guid>
    </item>
    <item>
      <title>(PHP) Default TimeZone - LuckyShot</title>
      <link>https://snipplr.com/view/21227/default-timezone</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 15 Oct 2009 13:56:21 UTC</pubDate>
      <guid>https://snipplr.com/view/21227/default-timezone</guid>
    </item>
    <item>
      <title>(PHP) Customize a file download (songs, PDFs, etc.) - LuckyShot</title>
      <link>https://snipplr.com/view/21005/customize-a-file-download-songs-pdfs-etc</link>
      <description>&lt;p&gt;This code is really useful to download files (i.e. an mp3 file). It will tell the browser about the file type youâ€™re about to download while also customizing the file name of it.&lt;/p&gt;</description>
      <pubDate>Sun, 11 Oct 2009 17:14:42 UTC</pubDate>
      <guid>https://snipplr.com/view/21005/customize-a-file-download-songs-pdfs-etc</guid>
    </item>
  </channel>
</rss>
