secureString($_REQUEST['video']))); $page = urldecode($function->secureString($_REQUEST['p'])); if (!isset($page) || !is_numeric($page)){ $page = 0; $title_tag = substr($searchQuery, 0, 50) . " Videos zu MP3 umwandeln"; } else { $title_tag = substr($searchQuery, 0, 50) . " Youtube Videos - Seite $page"; } $CurrentPage = $page; $PageNext = $CurrentPage + 1; $PageBack = $CurrentPage - 1; if ( $PageBack <= -1 ) { $PageBack = 0; }; $ResultsArray = $search->ytSearch($searchQuery, $page); $count = count($ResultsArray); if ( $count <= 0 || !is_numeric($count) ){ $robots = "NOINDEX,FOLLOW"; } elseif ( $count > 0 && is_numeric($count)) { $robots = "INDEX,FOLLOW,ALL"; }; $vor = "/search.php?video=".strtolower(str_replace(" ","+",trim($searchQuery)))."&p=$PageNext"; $zurck = "/search.php?video=".strtolower(str_replace(" ","+",trim($searchQuery)))."&p=$PageBack"; $navi = "

Nächste Seite - Vorherige Seite

"; $mein_text = ""; $desc_title = substr($searchQuery, 0, 50) . " Youtube Video als MP3 downloaden"; $searchTitle = trim(preg_replace("/\([^)]+\)/","", $searchQuery)); // http://stackoverflow.com/questions/2174362/remove-text-between-parentheses-php $searchTitle = preg_replace('/\W/',' ', $searchTitle); $SongtextRawContent = $search->SphinxSearch( $function->secureString($searchTitle) ); list( $songtext_title,$songtext_artist,$songtext_content ) = explode('#####', $SongtextRawContent[0] ); $songtext_content = preg_replace('#()+#i', "
", $songtext_content); # $songtext_content = preg_replace('#(
\s*)+#i', "
", $songtext_content); # $cache_uri = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; $duration = $function->getDuration($songtext_title); $lang = $function->GetLanguageFromString($songtext_content); if (strlen($songtext_title)<2){ $songtext_title = $searchQuery; } if (strlen($songtext_artist)<2){ $songtext_artist = "Allgemein"; } for ( $ArrayCount=0; $ArrayCount<=$count - 1; $ArrayCount++ ) { list( $title,$link,$author ) = explode('#####', $ResultsArray[$ArrayCount] ); $title = trim($title); $link = trim($link); $author = trim($author); $objSSDTube->identify($link, true); $visitorVideo = $objSSDTube->embed(); $video_image =<<$objSSDTube->title IMAGE; $video_content = $function->autolink($objSSDTube->content, array("target"=>"_blank","rel"=>"nofollow")); $video_duration = $objSSDTube->duration; $video_views = $objSSDTube->viewcount; $video_category = $objSSDTube->category; $lyrics_search = "/songtext.php?lyrics=" . strtolower(str_replace(" ","+",trim($title))); $my_extra_songtext = ""; if ( $ArrayCount == 0 ){ $my_extra_songtext =<<

$songtext_artist - Songtext $songtext_title Lyrics

$duration -

$songtext_content

END2; }; $mein_text .= <<


END; } $songtext_tmp = $songtext_content; $songtext_tmp = preg_replace('#()+#i', ",", $songtext_tmp); $songtext_tmp = preg_replace('#(
\s*)+#i', ",", $songtext_tmp); $excerpt = substr($songtext_tmp, 0,75); $content = array_merge( array('title_html_de'=>"$title_tag"), array('robots'=>"$robots"), array('yt_title'=>"$searchQuery als Youtube Video anschauen, mit MP3 umwandeln und mit Songtext integriert downloaden"), array('content'=>"$mein_text"), array('description_de'=>"$desc_title - $excerpt"), array('navi'=>"$navi"), array('keyword_de'=>"$searchQuery"), array('canonical_tag'=>"http://".$cache_uri) ); $design->setPath( $config->getTemplatePath('index_page') ); $design->display_cache('search_de', $content, true, 3600*24*3); if (strlen($searchQuery) >= 2 ){ $log->logQuerys( $searchQuery ); }; # if ($ResultCount >= 20 ){ exit(0); ?>