puika11 Posted May 26, 2015 Report Share Posted May 26, 2015 Sveiki, ir nepieciešamība pēc esošā koda mazas palabošanas! šis kods meklē mp3 failus listengo.com //listengo if($config['listengo_source']){ $mp3_search = get_content("http://www.listengo.es/musica/" . $keyword . "/" . $page); if ($mp3_search) { for ($i=0;$i<25;$i++) { $mp3_search = strstr($mp3_search, '<div align="center" id="stylized" class="myform">'); $song_title = explode('<b>', $mp3_search); $song_title = explode('</b>', $song_title[1]); $song_title = $song_title[0]; $song['song_title'] = trim(strip_tags($song_title)); $mp3_page_url = explode('<a href="http://www.listengo.es/song/', $mp3_search); $mp3_page_url = explode('"', $mp3_page_url[1]); $mp3_page_url = trim($mp3_page_url[0]); $mp3_page_url = "http://listengo.es/g/" . $mp3_page_url . ".mp3"; $mp3_page_url = str_replace("/8u", "/u", $mp3_page_url); $mp3_page_url = $db->safesql($mp3_page_url); $hash = gen_uuid($mp3_page_url); $song['id'] = $hash; $song['source'] = 6; $song['mp3_url'] = $mp3_page_url; $mp3_search = strstr($mp3_search, '<td align="right" width="30%">'); $song['play_url'] = play_url($song['id'], $song['source'], $song_title); if($song_title) $db->query("INSERT IGNORE INTO tan_cache SET hash='$hash', url='$mp3_page_url'"); if($song_title) $mp3s[] = $song; } } } Vajadzētu lai mp3 faili tiek meklēti no zvukoff.ru Kā to dabūt gatavu? Quote Link to comment Share on other sites More sharing options...
l27 Posted May 26, 2015 Report Share Posted May 26, 2015 (edited) Vieglāk ar regulārajām izteiksmēm (htmlu neredzot grūti uzrakstīt): if(preg_match('#<a href="http://www\.listengo\.es/song/([^"])+#',$html,$match){ print_r($match); } Edited May 26, 2015 by l27 Quote Link to comment Share on other sites More sharing options...
Raimonds Posted May 27, 2015 Report Share Posted May 27, 2015 Nepareiza sadaļa? :( Vai arī esi gatavs kādam par to maksāt? :D Quote Link to comment Share on other sites More sharing options...
puika11 Posted May 27, 2015 Author Report Share Posted May 27, 2015 Vispaar tas nebija pie sadaļas Darbs! tas bija konkrēti sadaļā Vispārēji! Kaut kādi neadekvāti administratori te! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.