Jump to content
php.lv forumi

palabot esošo kodu!


puika11

Recommended Posts

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? 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...