function get_between($input, $start, $end) {$substr = substr($input, strlen($start)+strpos($input, $start),
(strlen($input) - strpos($input, $end))*(-1));
return $substr;
}
$string = "www.jb51.net";
$start = "www.";
$end = ".net";
echo get_between($string, $start, $end); // output:coderbolg
$string = "http://www.jb51.net/";$start = "http://";
$end = "/";