<?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 07:57:15 +0000</lastBuildDate>
    <item>
      <title>(PHP) Find the size of a folder or directory - scopefragger</title>
      <link>https://snipplr.com/view/19363/find-the-size-of-a-folder-or-directory</link>
      <description>&lt;p&gt;Ever wanted to give your cliant an idear on how much disk space they have remaining?  The following script will tell your user how much disk space has been used and how much is remaining.  In this example $diskspace refers the amount of diskspace your cliant has avalable.  &#13;
&#13;
The value of disk space can be changed to suite,  if required this value can my connected to a mysql_query.  Such as if you are running a hosting service, have the value pulled from your hosting database.&#13;
&#13;
If you dont wish to include a /mb  removed the "." MB / ". $diskspace"  line 4&lt;/p&gt;</description>
      <pubDate>Mon, 07 Sep 2009 18:33:19 UTC</pubDate>
      <guid>https://snipplr.com/view/19363/find-the-size-of-a-folder-or-directory</guid>
    </item>
    <item>
      <title>(PHP) Count Varable character lengh - scopefragger</title>
      <link>https://snipplr.com/view/19194/count-varable-character-lengh</link>
      <description>&lt;p&gt;Sometimes counting the length of a variable is a necessity, such as when a new user registers. You may restrict a limit of 10 characters as a username or password, Using the following php function you can count the length of a variable.&#13;
&#13;
In additionally I have provided an example â€˜Ifâ€™ statement that could be used in a username length validation.&lt;/p&gt;</description>
      <pubDate>Wed, 02 Sep 2009 20:09:48 UTC</pubDate>
      <guid>https://snipplr.com/view/19194/count-varable-character-lengh</guid>
    </item>
    <item>
      <title>(PHP) Count Varable character lengh - scopefragger</title>
      <link>https://snipplr.com/view/19193/count-varable-character-lengh</link>
      <description>&lt;p&gt;Sometimes counting the length of a variable is a necessity, such as when a new user registers. You may restrict a limit of 10 characters as a username or password, Using the following php function you can count the length of a variable.&#13;
&#13;
In additionally I have provided an example â€˜Ifâ€™ statement that could be used in a username length validation.&lt;/p&gt;</description>
      <pubDate>Wed, 02 Sep 2009 20:09:47 UTC</pubDate>
      <guid>https://snipplr.com/view/19193/count-varable-character-lengh</guid>
    </item>
    <item>
      <title>(PHP) Convert RGB to HEX - scopefragger</title>
      <link>https://snipplr.com/view/19143/convert-rgb-to-hex</link>
      <description>&lt;p&gt;Ever needed to convert rgb to hex on your website, maybe you have a slider that handles rgb but your backend uses hex,  this issue can be resolved easily be using the following code.  Remember to keep in mind that php and html primarily uses hex colors.&lt;/p&gt;</description>
      <pubDate>Tue, 01 Sep 2009 19:16:50 UTC</pubDate>
      <guid>https://snipplr.com/view/19143/convert-rgb-to-hex</guid>
    </item>
    <item>
      <title>(CSS) Multiple background images in css - scopefragger</title>
      <link>https://snipplr.com/view/19142/multiple-background-images-in-css</link>
      <description>&lt;p&gt;Ever needed to use to background images in a table or div?  It is possible b just using css.  Although this is yet to be a standard safari will allow you to apply 2!  Css backgrounds, however IE,  FIRFOX and retro opera users will only see 1 !&lt;/p&gt;</description>
      <pubDate>Tue, 01 Sep 2009 18:12:50 UTC</pubDate>
      <guid>https://snipplr.com/view/19142/multiple-background-images-in-css</guid>
    </item>
    <item>
      <title>(CSS) restrict the maximum size of an image - scopefragger</title>
      <link>https://snipplr.com/view/19106/restrict-the-maximum-size-of-an-image</link>
      <description>&lt;p&gt;Ever needed to restrict an images size?  Or stop it from growing best the size of your div/table.  Itâ€™s a horrible feeling when you see your nicely designed site get trashed by a single image because itâ€™s a pixel or two too big!  And if itâ€™s a photo or a desktop image it may not always be appropriate to cut it down.  The following can be applied to a class or id to limit the maximum size of an image.  Please remember that applying both a height and a width restriction will resize the image completely,  however just applying height or width will keep the image in its normal shape (  ie change 10x20 to 5x10 ).&lt;/p&gt;</description>
      <pubDate>Tue, 01 Sep 2009 04:25:17 UTC</pubDate>
      <guid>https://snipplr.com/view/19106/restrict-the-maximum-size-of-an-image</guid>
    </item>
    <item>
      <title>(PHP) Getusers current page - scopefragger</title>
      <link>https://snipplr.com/view/19105/getusers-current-page</link>
      <description>&lt;p&gt;Ever needed to get the page your user is currently viewing?  This can be done quickly in php all thanks to $_server.&lt;/p&gt;</description>
      <pubDate>Tue, 01 Sep 2009 04:14:33 UTC</pubDate>
      <guid>https://snipplr.com/view/19105/getusers-current-page</guid>
    </item>
    <item>
      <title>(PHP) Redirecting your users browser - scopefragger</title>
      <link>https://snipplr.com/view/19076/redirecting-your-users-browser</link>
      <description>&lt;p&gt;Sometimes you just need to mask a script or reject a user from a page this can be done effortlessly using a single line of code.  Header location will allow you to redirect a user quickly and without them having any control over the action.&#13;
&#13;
A good example of this forced redirection is an â€œifâ€ statement.   Here is a simple if statement using the header location.  If the users ip addres =  â€™192.167.3.2â€™ then they will be redirected to the wanted page, else they will be rejected and taken to another page such as a 401 or 403&#13;
&#13;
&lt;div&gt;if ($ip_address==â€™192.167.3.2â€™){ header('Location: http://www.example.com/allow_in.php'); &#13;
}&#13;
 else&#13;
{&#13;
header('Location: http://www.example.com/ deny_acces.php '); &#13;
}&lt;/p&gt;</description>
      <pubDate>Mon, 31 Aug 2009 19:20:03 UTC</pubDate>
      <guid>https://snipplr.com/view/19076/redirecting-your-users-browser</guid>
    </item>
  </channel>
</rss>
