<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
<channel>

<title>PHPSnips New Users Code Snippets</title>
<description>This Feed shows the latest new snippets from our users.</description>
<link>http://phpsnips.com/rss/rssNewUserSnips.xml</link><item>

	<title>URL Shortening for long URLs</title>

	<description>$long_url = &amp;quot;http://www.google.com/?q=oh+hai&amp;quot;; 
$short_url = implode('',file(&amp;quot;http://to.m8.to/api/shortenLink?url=$long_url&amp;quot;));</description>

	<link>http://phpsnips.com/snippet.php?id=20</link>

	</item><item>

	<title>Monthly Content Sorting</title>

	<description>[url=http://wisnercanoes.com/node/2]Example[/url]

&amp;lt;?php 

/*
 * This script makes a list of content for each month and puts the current month first, and then lists the months coming up.
 * It i</description>

	<link>http://phpsnips.com/snippet.php?id=19</link>

	</item><item>

	<title>Show String Trimmed and Dotted</title>

	<description>&amp;lt;?php
// @param $string A string value to be trimmmed.
// @param $length The max. visible length with added dots. If the string is longer, the remaining part will be trimmed. (Default is 15)
// @pa</description>

	<link>http://phpsnips.com/snippet.php?id=18</link>

	</item><item>

	<title>Human readable file size</title>

	<description>&amp;lt;?php
/**
* function humanSize (integer $size)
*
* Receive the file size in bytes and return the human readable value (B, KB, MB)
*
* Example:
*
* echo humanSize(filesize(__FILE__));
*
* ret</description>

	<link>http://phpsnips.com/snippet.php?id=17</link>

	</item><item>

	<title>Randomize array values</title>

	<description>&amp;lt;?php
/**
* function randomArray (array $array)
*
* Randomize array values
*
* Example:
*
* $array = array('value1','value2','value3','value4');
*
* $random = randomArray($array);
*
* retu</description>

	<link>http://phpsnips.com/snippet.php?id=14</link>

	</item><item>

	<title>Create a recursive folder</title>

	<description>&amp;lt;?php
/**
* function recursiveDir (string $folder)
*
* Crea un arbol de directorios de manera recursiva
*
* Example:
*
* recursiveDir('/tmp/folder/test/random/other');
*
* return boolean
*/</description>

	<link>http://phpsnips.com/snippet.php?id=13</link>

	</item><item>

	<title>Simple URI location</title>

	<description>&amp;lt;?php
/**
* function simpleURI (string $text, boolean $low, boolean $html = false)
*
* Create a optimized url from a regular string
*
* @$low: true/false lowercase / normal case
* @$html: true/</description>

	<link>http://phpsnips.com/snippet.php?id=12</link>

	</item><item>

	<title>Tell how many, and which, users are online (alternative)</title>

	<description> 
This is an attempt at a more efficient users online script
  originally by mr_mind (Tell how many, and which, users are online)

$user_key is the key in which the user id is stored in
  $_SESSI</description>

	<link>http://phpsnips.com/snippet.php?id=11</link>

	</item><item>

	<title>Create thumb from uploading photo</title>

	<description>&amp;lt;?
if ($_REQUEST['action']==&amp;quot;add&amp;quot;){

$userfile = $HTTP_POST_FILES['photo']['tmp_name'];
$userfile_name = $HTTP_POST_FILES['photo']['name'];
$userfile_size = $HTTP_POST_FILES['photo']['size'];
$u</description>

	<link>http://phpsnips.com/snippet.php?id=10</link>

	</item><item>

	<title>Tell how many, and which, users are online</title>

	<description>I do not like the idea of using a database to show how many and which users are online,
so I looked around and asked a whole lot of people how to do it and every time I got a
response saying that it</description>

	<link>http://phpsnips.com/snippet.php?id=9</link>

	</item><item>

	<title>Site maintenance</title>

	<description>I find that redirecting the user can cause angry users if you go into 
maintenance mode in the middle of posting something, try this instead
of the method posted before if you start to get angry com</description>

	<link>http://phpsnips.com/snippet.php?id=8</link>

	</item><item>

	<title>Advanced Security Image Verification (A.K.A Captcha)</title>

	<description>A while back, I was searching for an image security verification script or 
&amp;quot;captcha&amp;quot; to stop bots from registering on my website. I did find one that 
worked, but did not satisfy my likes. After a </description>

	<link>http://phpsnips.com/snippet.php?id=7</link>

	</item><item>

	<title>Replace substrings in a haystack with perl regex using preg_match_all()</title>

	<description>Replace substrings in a haystack with perl regular expression
using preg_match_all()

&amp;lt;?php
function preg_replace_subs($pat,$hay,$replaceArr, $out = false) {
# ie for replaceArr: array(2 =&amp;gt; 'two'</description>

	<link>http://phpsnips.com/snippet.php?id=6</link>

	</item><item>

	<title>Highlight Full Matches &amp; Substring Matches from Regex from preg_match_all()</title>

	<description> 
&amp;lt;?php
function highlightPregHay($pat,$hay,$colors,$fullColor,$out = false) {
	//out must be with preg_offset_capture flag, no special ordering
	$hayLen = strlen($hay);
	$matches = true;
	$h = </description>

	<link>http://phpsnips.com/snippet.php?id=5</link>

	</item><item>

	<title>Function to Grab Text between two markers</title>

	<description>&amp;lt;?php
	function textbetweenarray($s1,$s2,$s){
		$myarray=array();
		$s1=strtolower($s1);
		$s2=strtolower($s2);
		$L1=strlen($s1);
		$L2=strlen($s2);
		$scheck=strtolower($s);

		do {
			$po</description>

	<link>http://phpsnips.com/snippet.php?id=4</link>

	</item><item>

	<title>Function to Output Data and Arrays in TextAreas</title>

	<description>&amp;lt;?php
function o($data, $cols = 30, $rows = 30) { //width, height
		if (is_array($data)) {
			echo &amp;quot;\n\n&amp;lt;textarea cols=\&amp;quot;&amp;quot;.$cols.&amp;quot;\&amp;quot; rows=\&amp;quot;&amp;quot;.$rows.&amp;quot;\&amp;quot;&amp;gt;&amp;quot;;
			print_r($data);
			echo &amp;quot;&amp;lt;/textarea&amp;gt;\</description>

	<link>http://phpsnips.com/snippet.php?id=3</link>

	</item>
</channel>
</rss>