/*
* String functions
*
* RSS Power Plus Professional v1.11
* Copyright (c) 2008-2009
* Success on the Internet Pty Ltd
* PO Box 25
* Salisbury SA 5108
* Australia
* Phone: +61 422 512 549
* Fax: +61 8 8425 9657
* Web: http://www.rss-power-plus.com
* Support: http://www.marketing-assassins.com
*
*/
function get_string_between_sub($search, $from, $start_pos, &$pos1, &$search1, $case_sensitive)
{
if ( !is_array($search) ) $search = array($search);
$pos1_curr = false;
$search1_curr = '';
$pos1 = false;
$search1 = '';
foreach( $search as $search1_curr )
{
$pos1_curr = call_user_func( $case_sensitive ? 'strpos' : 'stripos', $from, $search1_curr, $start_pos );
if ( $pos1_curr === false )
{
continue;
}
else if ( $pos1 === false or $pos1_curr < $pos1 )
{
$pos1 = $pos1_curr;
$search1 = $search1_curr;
}
}
}
// If you pass an array to this function in the 2 first arguments,
// it'll try to find out the minimal position of those 2...
function get_string_between( $s1_arr, $s2_arr, $from, &$start_pos, $case_sensitive = false, $including_outsides = false, $stop_if_not_found = true, $add_search2_length = true )
{
get_string_between_sub($s1_arr, $from, $start_pos, $pos1, $search1, $case_sensitive);
get_string_between_sub($s2_arr, $from, $pos1 === false ? $start_pos : $pos1 + strlen($search1), $pos2, $search2, $case_sensitive);
if ( $pos1 !== false )
{
if ( !$including_outsides )
$pos1 += strlen($search1);
}
else if ( $stop_if_not_found )
{
$start_pos = strlen($from);
return '';
}
else
{
$pos1 = $start_pos;
}
if ( $pos2 !== false )
{
if ( $add_search2_length )
$start_pos = $pos2 + strlen($search2);
if ( $including_outsides )
$pos2 += strlen($search2);
}
else if ( $stop_if_not_found )
{
$start_pos = strlen($from); // top1 r-p-p
return '';
}
else
{
$start_pos = strlen($from);
$pos2 = strlen($from);
}
return substr( $from, $pos1, $pos2 - $pos1 );
}
function is_space( $c )
{
settype($c, 'string');
return in_array($c{0}, array(" ", "\t", "\r", "\n"));
}
2009 – March
March 2, 2009
March 3, 2009
March 5, 2009
March 6, 2009
March 7, 2009
March 9, 2009
March 11, 2009
March 12, 2009
March 13, 2009
March 15, 2009
March 17, 2009
March 18, 2009
March 19, 2009
March 20, 2009
March 25, 2009
March 27, 2009
March 28, 2009
March 29, 2009
March 30, 2009