<?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>Sat, 13 Jun 2026 15:39:49 +0000</lastBuildDate>
    <item>
      <title>(PHP) WordPress YouTube Z-Index Fix - paulgrenwood</title>
      <link>https://snipplr.com/view/57789/wordpress-youtube-zindex-fix</link>
      <description>&lt;p&gt;WordPress allows you to embed videos so easily using oEmbed. You can easily add videos to your post just pasting their URL to your post. WordPress handles all the object and embed HTML for you. But this code is missing wmode parameter which is necessary for CSS z-index to work.&#13;
&#13;
&#13;
Here I will show you how to filter the HTML for the embedded video and add this parameter so easily. For this we will use the oembed_dataparse filter which is run when a user adds a video to the post. Place the following code in your theme's functions.php file:&lt;/p&gt;</description>
      <pubDate>Fri, 12 Aug 2011 19:38:19 UTC</pubDate>
      <guid>https://snipplr.com/view/57789/wordpress-youtube-zindex-fix</guid>
    </item>
    <item>
      <title>(PHP) Display Current Year with PHP - paulgrenwood</title>
      <link>https://snipplr.com/view/27339/display-current-year-with-php</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Fri, 29 Jan 2010 18:30:15 UTC</pubDate>
      <guid>https://snipplr.com/view/27339/display-current-year-with-php</guid>
    </item>
    <item>
      <title>(PHP) Randomize Background Image - paulgrenwood</title>
      <link>https://snipplr.com/view/21986/randomize-background-image</link>
      <description>&lt;p&gt;Set up and array of filenames, which correspond to the file names of the images you are trying to randomize.&lt;/p&gt;</description>
      <pubDate>Tue, 27 Oct 2009 16:14:28 UTC</pubDate>
      <guid>https://snipplr.com/view/21986/randomize-background-image</guid>
    </item>
    <item>
      <title>(PHP) Cleaning Variables - paulgrenwood</title>
      <link>https://snipplr.com/view/20469/cleaning-variables</link>
      <description>&lt;p&gt;Variables that are submitted via web forms always need to be cleaned/sanitized before use in any way, to prevent against all kinds of different malicious intent.&lt;/p&gt;</description>
      <pubDate>Wed, 30 Sep 2009 08:54:37 UTC</pubDate>
      <guid>https://snipplr.com/view/20469/cleaning-variables</guid>
    </item>
    <item>
      <title>(PHP) How to Code a Signup Form with Email Confirmation - paulgrenwood</title>
      <link>https://snipplr.com/view/20418/how-to-code-a-signup-form-with-email-confirmation</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 29 Sep 2009 10:30:19 UTC</pubDate>
      <guid>https://snipplr.com/view/20418/how-to-code-a-signup-form-with-email-confirmation</guid>
    </item>
    <item>
      <title>(PHP) Custom Fields - SEO Your Title Tag - paulgrenwood</title>
      <link>https://snipplr.com/view/20160/custom-fields--seo-your-title-tag</link>
      <description>&lt;p&gt;Search Engine Optimisation, or SEO is something that a lot of bloggers get obsessed about, whilst others think itâ€™s a load of rubbish. Iâ€™m halfway between the two â€“ whilst I believe that you can change certain things to better SEO your content, such as adding H1, H2 etc tags in the appropriate places, I personally donâ€™t think you should get too carried away with it. One of the things you can do though is change your title tag, and this custom field trick will let you set a custom field and itâ€™ll appear as your title tag. Add the code below to your header.php file:&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 16:05:36 UTC</pubDate>
      <guid>https://snipplr.com/view/20160/custom-fields--seo-your-title-tag</guid>
    </item>
    <item>
      <title>(PHP) Custom Fields - Display a thumbnail (and auto resize it) - paulgrenwood</title>
      <link>https://snipplr.com/view/20159/custom-fields--display-a-thumbnail-and-auto-resize-it</link>
      <description>&lt;p&gt;Whilst there are a number of ways of displaying thumbnails, this is still my favourite (even if it does require the most work!). First, upload timthumb to /wp-content/themes/yourtheme/ and create an image 250px by 250px with your siteâ€™s logo and upload it to yourtheme/images/. This is the image that will be displayed if no custom field is displayed. Then, for every thumbnail, youâ€™ll need to create it in Photoshop and upload it to your blog. Next, create a custom field â€˜Imageâ€™ with the path of the image as the value of the custom field. Now for the code:&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 16:04:25 UTC</pubDate>
      <guid>https://snipplr.com/view/20159/custom-fields--display-a-thumbnail-and-auto-resize-it</guid>
    </item>
    <item>
      <title>(PHP) Custom Fields - Create a Post Series - paulgrenwood</title>
      <link>https://snipplr.com/view/20157/custom-fields--create-a-post-series</link>
      <description>&lt;p&gt;This is something that I wished Iâ€™d thought of a long time ago â€“ show other posts in the same series using not a plugin but custom fields. All youâ€™ve got to do for this trick to work is create a custom field â€˜Seriesâ€™ with a link to each other post in the series. Each post must be a seperate custom field. Then, use the code below to display all the other posts in the same series!&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 16:03:35 UTC</pubDate>
      <guid>https://snipplr.com/view/20157/custom-fields--create-a-post-series</guid>
    </item>
    <item>
      <title>(PHP) Allow Visitors to Email Posts to Their Friends - paulgrenwood</title>
      <link>https://snipplr.com/view/20156/allow-visitors-to-email-posts-to-their-friends</link>
      <description>&lt;p&gt;Allow Visitors to Email Posts to Their Friends&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 16:02:57 UTC</pubDate>
      <guid>https://snipplr.com/view/20156/allow-visitors-to-email-posts-to-their-friends</guid>
    </item>
    <item>
      <title>(PHP) Add Custom Bookmark Links - paulgrenwood</title>
      <link>https://snipplr.com/view/20155/add-custom-bookmark-links</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 16:02:12 UTC</pubDate>
      <guid>https://snipplr.com/view/20155/add-custom-bookmark-links</guid>
    </item>
    <item>
      <title>(PHP) Add a "Share on Facebook" Link - paulgrenwood</title>
      <link>https://snipplr.com/view/20154/add-a-share-on-facebook-link</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 16:01:06 UTC</pubDate>
      <guid>https://snipplr.com/view/20154/add-a-share-on-facebook-link</guid>
    </item>
    <item>
      <title>(PHP) Zip Files on the Fly - paulgrenwood</title>
      <link>https://snipplr.com/view/20153/zip-files-on-the-fly</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 16:00:14 UTC</pubDate>
      <guid>https://snipplr.com/view/20153/zip-files-on-the-fly</guid>
    </item>
    <item>
      <title>(PHP) Validate Email Address - paulgrenwood</title>
      <link>https://snipplr.com/view/20152/validate-email-address</link>
      <description>&lt;p&gt;E-mail validation is perhaps the most used validation in web forms, this code will validate email address and also optionally check the MX records of the domain provided in email address to make email validation more robust.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:59:47 UTC</pubDate>
      <guid>https://snipplr.com/view/20152/validate-email-address</guid>
    </item>
    <item>
      <title>(PHP) Truncate Text at Word Break - paulgrenwood</title>
      <link>https://snipplr.com/view/20149/truncate-text-at-word-break</link>
      <description>&lt;p&gt;This function will truncate strings only at word breaks which can be used to show a teaser for complete article without breaking words.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:58:39 UTC</pubDate>
      <guid>https://snipplr.com/view/20149/truncate-text-at-word-break</guid>
    </item>
    <item>
      <title>(PHP) Resize Images on the fly - paulgrenwood</title>
      <link>https://snipplr.com/view/20148/resize-images-on-the-fly</link>
      <description>&lt;p&gt;Creating thumbnails of the images is required many a times, this code will be useful to know about the logic of thumbnail generation.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:58:09 UTC</pubDate>
      <guid>https://snipplr.com/view/20148/resize-images-on-the-fly</guid>
    </item>
    <item>
      <title>(PHP) Prepend http to a URL - paulgrenwood</title>
      <link>https://snipplr.com/view/20147/prepend-http-to-a-url</link>
      <description>&lt;p&gt;Some times you need to accept some url as input but users seldom add http:// to it, this code will add http:// to the URL if itâ€™s not there.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:57:32 UTC</pubDate>
      <guid>https://snipplr.com/view/20147/prepend-http-to-a-url</guid>
    </item>
    <item>
      <title>(PHP) Parse JSON Data - paulgrenwood</title>
      <link>https://snipplr.com/view/20145/parse-json-data</link>
      <description>&lt;p&gt;With most of the popular web services like Twitter providing their data through APIs, it is always helpful to know how to parse API data which is sent in various formats including JSON, XML etc.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:56:33 UTC</pubDate>
      <guid>https://snipplr.com/view/20145/parse-json-data</guid>
    </item>
    <item>
      <title>(PHP) List Directory Contents - paulgrenwood</title>
      <link>https://snipplr.com/view/20144/list-directory-contents</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:55:52 UTC</pubDate>
      <guid>https://snipplr.com/view/20144/list-directory-contents</guid>
    </item>
    <item>
      <title>(PHP) isset instead of strlen - paulgrenwood</title>
      <link>https://snipplr.com/view/20143/isset-instead-of-strlen</link>
      <description>&lt;p&gt;This snippet uses isset() instead strlen() to verify a PHP variable (in this example $username) is set and is at least six characters long.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:55:18 UTC</pubDate>
      <guid>https://snipplr.com/view/20143/isset-instead-of-strlen</guid>
    </item>
    <item>
      <title>(PHP) Human Readable Random String - paulgrenwood</title>
      <link>https://snipplr.com/view/20142/human-readable-random-string</link>
      <description>&lt;p&gt;This code will create a human readable string that will look more close to dictionary words, useful for captchas.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:54:43 UTC</pubDate>
      <guid>https://snipplr.com/view/20142/human-readable-random-string</guid>
    </item>
    <item>
      <title>(PHP) Get Real IP Address of Client - paulgrenwood</title>
      <link>https://snipplr.com/view/20141/get-real-ip-address-of-client</link>
      <description>&lt;p&gt;This function will fetch the real IP address of the user even if he is behind a proxy server.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:54:14 UTC</pubDate>
      <guid>https://snipplr.com/view/20141/get-real-ip-address-of-client</guid>
    </item>
    <item>
      <title>(PHP) Generate Random String - paulgrenwood</title>
      <link>https://snipplr.com/view/20140/generate-random-string</link>
      <description>&lt;p&gt;If you donâ€™t need human readable string, then use this function instead, which will create a random string you can use for user idâ€™s etc.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:53:33 UTC</pubDate>
      <guid>https://snipplr.com/view/20140/generate-random-string</guid>
    </item>
    <item>
      <title>(PHP) Force File Download - paulgrenwood</title>
      <link>https://snipplr.com/view/20139/force-file-download</link>
      <description>&lt;p&gt;Provide files to the user by forcing them to download.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:53:04 UTC</pubDate>
      <guid>https://snipplr.com/view/20139/force-file-download</guid>
    </item>
    <item>
      <title>(PHP) Encode Email Address - paulgrenwood</title>
      <link>https://snipplr.com/view/20138/encode-email-address</link>
      <description>&lt;p&gt;With this snippet, you can encode any email address into HTML entities so that spam bots do not find it.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:52:24 UTC</pubDate>
      <guid>https://snipplr.com/view/20138/encode-email-address</guid>
    </item>
    <item>
      <title>(PHP) Convert URLs within String to Links - paulgrenwood</title>
      <link>https://snipplr.com/view/20137/convert-urls-within-string-to-links</link>
      <description>&lt;p&gt;This function converts URLs and e-mail addresses within a string into clickable hyperlinks.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:51:21 UTC</pubDate>
      <guid>https://snipplr.com/view/20137/convert-urls-within-string-to-links</guid>
    </item>
    <item>
      <title>(PHP) Convert Strings into Clickable URL - paulgrenwood</title>
      <link>https://snipplr.com/view/20136/convert-strings-into-clickable-url</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:50:39 UTC</pubDate>
      <guid>https://snipplr.com/view/20136/convert-strings-into-clickable-url</guid>
    </item>
  </channel>
</rss>
