- substr: documentation ( source)
<?
if(isset($_GET['p']) && $_GET['p'] != "" && $_GET['p'] > 0)
{
$p = (int)$_GET['p'];
}
else
{
$p = 0;
}
$start = $p*1 . '1';
$tube = "http://gdata.youtube.com/feeds/api/videos?q=$ser&duration=short&start-index=$start&max-results=10&v=2&alt=rss&prettyprint=true";
require_once "func/curl.busquedas.php";
$sxm = google_url($tube);
$oxm = new SimpleXMLElement($sxm);
$total1 = $oxm->channel->item->pubDate;
$video = $oxm->channel->item->children("media",true)->group->children("yt",true)->videoid;
if($total1)
{
foreach($oxm->channel->item as $e){
$titulo = $e->title;
$url = $e->children("media",true)->group->children("yt",true)->videoid;
$titulo = substr($titulo,0,70);
echo'
<li class="list-group-item result even" id="'.$url.'">
<h2><em>'.$titulo.'</em></h2>
<p>Size: 10.3 MB | Source: youtube.com</p>
<div class="action container">
<div class="button">
<a href="http://www.music-clips.net/api/'.$url.'/mp3/" class="download btn btn-info btn-small" target="_blank">Download</a> ';
echo"
<a href=\"#\" onclick=\"LoadVideo('$url');return false;\" class=\"listen btn btn-info btn-small\">Listen</a>
</div>
</div>
</li>";
}
}
?>