MP3 and Lyrics search and download script for mobile? Cant find em.
Started on the old forum in July 2009 · view the original in the archive · old links redirect here
TL;DR · summary of 36 replies
- - The fix was provided in a modified version of a Lyric search script, which could be used as a starting point for an MP3 search engine.
- - A user shared a working MP3 search script from 4shared (xtmobi.com/mp3) and another user suggested downloading and editing the tankamusik.com script posted by pimpin.
- - The discussion concluded with users expressing interest in purchasing or modifying scripts, but no specific code approach was provided.
Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.
Whay you dont create your own site?
Create a database with - id , name of mp3 rows. Insert into database : id (autoincrement) and mp3 names. Create a directory for mp3's.
Create script for search.
Use for search some part of this:
$query = "select NameOfMp from mp3 WHERE NameOfMp='$search'";
$result = mysql_db_query("mp3", $query);
Show the result:
echo "Display NameOfMp ";
Here are some useful mp3 search sites: wapmy.ru/musicsearch spaces.ru/music wap4u.ru/mp3search mymp3.name/musicsearch azon.mobi/mp3 matched.ru/mp3 ...and you find 90% any song 😉
www.inbuzunar.mobi -Your mobile portal pocket
i used to use this sometimes ago,dunno if it still work tho...
heres a Lyric search script,extracted from my old site,coded by wap2k
<? header("Content-Type: text/vnd.wap.wml"); echo"<?xml version=\"1.0\" encoding=\"UTF-8\"?>";echo "\n<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"\n\"http://www.wapforum.org/DTD/wml_1.1.xml\">\n<wml>\n"; print "<card id="card1" title="Lyric Search@wapwarz.skycity.co.za">"; print " ";
$sid = $_REQUEST["sid"];
function myhtmlentities($myents){ $myents = str_replace("&","&",$myents); return $myents; }
function get_string_between($string, $start, $end){
$string = " ".$string;
$ini = strpos($string,$start);
if ($ini == 0) return "";
$ini += strlen($start);
$len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
function extract_URLs($s) { $res = array(); preg_match_all('@(<a .</a>)@Uis', $s, $a); foreach ($a[1] as $x) { $gtpos = strpos($x, '>'); $y = substr($x, 0, $gtpos); if ($hrefpos = strpos($x, 'href=')) { $z = substr($y, $hrefpos+5); $z = preg_replace('/^(\S+)\s.$/U', '$1', $z); if ($z[0] == '"' && substr($z, -1) == '"') $z = substr($z, 1, -1); if ($z[0] == "'" && substr($z, -1) == "'") $z = substr($z, 1, -1); $res[] = array(substr($x, $gtpos+1, -4), $z); } } unset($a); return $res; }
$wapsidemode = $_REQUEST["ws"];
if(empty($wapsidemode)){ print "Browse Artists: "; print '<select name="letter" multiple="false">
<option value="0">0-9</option> <option value="a">A</option> <option value="b">B</option> <option value="c">C</option> <option value="d">D</option> <option value="e">E</option> <option value="f">F</option> <option value="g">G</option> <option value="h">H</option> <option value="i">I</option> <option value="j">J</option> <option value="k">K</option> <option value="l">L</option> <option value="n">M</option> <option value="n">N</option> <option value="o">O</option> <option value="p">P</option> <option value="q">Q</option> <option value="r">R</option> <option value="s">S</option> <option value="t">T</option> <option value="u">U</option> <option value="v">V</option> <option value="w">W</option> <option value="x">X</option> <option value="y">Y</option> <option value="z">Z</option> </select> ';print "<anchor>[-Go-] <go href="lyrics.php" method="get"> <postfield name="letter" value="$(letter)"/> <postfield name="ws" value="letter"/> <postfield name="sid" value="$sid"/> </go> </anchor>"; }
$letit = $_REQUEST["letter"]; if($wapsidemode=="letter"){ $a = file_get_contents('http://www.lyricsdownload.com/'.$letit.'-full_list.html'); $a = get_string_between($a,"<ul imagesrc="http://www.lyricsdownload.com/images/arrow_r.gif" style="margin-left: 20">","</ul>"); $a = str_replace("<li><a class="txt_1"","<a ",$a); $a = str_replace("</a>","</a> ",$a); $a = str_replace("</li>","",$a); $a = str_replace("<ul imagesrc="http://www.lyricsdownload.com/images/arrow_r.gif" style="margin-left: 20">","",$a); $a = str_replace("</ul>","</a> ",$a); $a = str_replace("&","&",$a); $links = extract_URLs($a); $list= ""; foreach ($links as $v) { $list .= "<a href="lyrics.php?s=".myhtmlentities($v[1])."&ws=singer&sid=".$sid."">".myhtmlentities($v[0])."</a> "; } $fulllist = explode(" ",$list); $page = $_REQUEST["page"]; print "Lyrics "; print ($page - 10)." / ".$page." of "; print count($fulllist)."
"; for ($i = $page-1; $i < $page+10; $i++) { print $fulllist[$i]." "; } $ppage = $page - 10; $npage = $page + 10; print "------ "; print "<a href="lyrics.php?letter=".$letit."&page=$npage&ws=".$ws."&sid=".$sid."">more...</a> "; print "<a href="lyrics.php?letter=".$letit."&page=$ppage&ws=".$ws."&sid=".$sid."">back...</a> "; print "<a href="lyrics.php?sid=".$sid."">Lyrics Index</a>"; } $singer = $_REQUEST["s"]; if($wapsidemode=="singer"){ $sa = file_get_contents('http://www.lyricsdownload.com/'.$singer.''); $sa = str_replace("<ul imagesrc="http://www.lyricsdownload.com/images/arrow_r.gif" style="margin-left: 20">","<ul imagesrc="arrow_r.gif">",$sa); $sa = str_replace("<ul imagesrc="http://www.lyricsdownload.com/images/arrow_r.gif" style="margin-left: 5">","<ul imagesrc="arrow_r.gif">",$sa); $sa = get_string_between($sa,"<ul imagesrc="arrow_r.gif">","</ul>"); $links = extract_URLs($sa); $list= ""; foreach ($links as $v) { $list .= "<a href="lyrics.php?song=".myhtmlentities($v[1])."&ws=viewlyrics&sid=".$sid."">".myhtmlentities($v[0])."</a> "; } $fulllist = explode(" ",$list); $page = $_REQUEST["page"]; print "Lyrics "; print ($page - 10)." / ".$page." of "; print count($fulllist)."
"; for ($i = $page-1; $i < $page+10; $i++) { print $fulllist[$i]." "; } $firstletter = substr($s, 0, 1); $ppage = $page - 10; $npage = $page + 10; print "------ "; print "<a href="lyrics.php?ws=".$ws."&s=".$s."&page=$npage&sid=".$sid."">more...</a> "; print "<a href="lyrics.php?ws=".$ws."&s=".$s."&page=$npage&sid=".$sid."">back...</a> "; print "<a href="lyrics.php?ws=".$ws."&letter=".$firstletter."&sid=".$sid."">Back to [".$firstletter."]</a> "; print "<a href="lyrics.php?sid=".$sid."">Lyrics Index</a>"; } $song = $_REQUEST["song"]; if($wapsidemode=="viewlyrics"){ $saaa = file_get_contents('http://www.lyricsdownload.com/'.$song.''); $saaa = str_replace("\n", "", $saaa); $saaa = str_replace("\t", "", $saaa); $saaa = get_string_between($saaa,"",""); $saaa = str_replace("
"," ",$saaa); $saaa = str_replace("","",$saaa); $saaa = str_replace("","",$saaa); $saaa = str_replace("&","&",$saaa); echo $saaa; $firstletter = substr($song, 0, 1); print "
<anchor>Back to singer<prev/></anchor> "; print "<a href="lyrics.php?ws=letter&letter=".$firstletter."&sid=".$sid."">Back to [".$firstletter."]</a> "; print "<a href="lyrics.php?sid=".$sid."">Lyrics Index</a>"; } ?>
</card> </wml>Here is my lyrsic script fixed up.......
<?php
header("Content-Type: text/vnd.wap.wml");
echo"<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
echo "\n<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"\n\"http://www.wapforum.org/DTD/wml_1.1.xml\">\n<wml>\n";
print "<card id=\"card1\" title=\"Lyric\">";
print "<p>";
$ws = trim($_REQUEST["ws"]);
$letit = trim($_REQUEST["letter"]);
$wapsidemode = trim($_REQUEST["ws"]);
$page = $_REQUEST["page"];
function myhtmlentities($myents){
$myents = str_replace("&","&",$myents);
return $myents;
}
function get_string_between($string, $start, $end){
$string = " ".$string;
$ini = strpos($string,$start);
if ($ini == 0) return "";
$ini += strlen($start);
$len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
function extract_URLs($s) {
$res = array();
preg_match_all('@(<a .*</a>)@Uis', $s, $a);
foreach ($a[1] as $x) {
$gtpos = strpos($x, '>');
$y = substr($x, 0, $gtpos);
if ($hrefpos = strpos($x, 'href=')) {
$z = substr($y, $hrefpos+5);
$z = preg_replace('/^(\S+)\s.*$/U', '$1', $z);
if ($z[0] == '"' && substr($z, -1) == '"') $z = substr($z, 1, -1);
if ($z[0] == "'" && substr($z, -1) == "'") $z = substr($z, 1, -1);
$res[] = array(substr($x, $gtpos+1, -4), $z);
}
}
unset($a);
return $res;
}
if(empty($wapsidemode)){
print "<b>Browse Artists:</b><br/>";
print '<select name="letter" multiple="false">
<option value="0">0-9</option>
<option value="a">A</option>
<option value="b">B</option>
<option value="c">C</option>
<option value="d">D</option>
<option value="e">E</option>
<option value="f">F</option>
<option value="g">G</option>
<option value="h">H</option>
<option value="i">I</option>
<option value="j">J</option>
<option value="k">K</option>
<option value="l">L</option>
<option value="n">M</option>
<option value="n">N</option>
<option value="o">O</option>
<option value="p">P</option>
<option value="q">Q</option>
<option value="r">R</option>
<option value="s">S</option>
<option value="t">T</option>
<option value="u">U</option>
<option value="v">V</option>
<option value="w">W</option>
<option value="x">X</option>
<option value="y">Y</option>
<option value="z">Z</option>
</select><br/>';
print "<anchor>[-Go-]
<go href=\"lyrics.php\" method=\"get\">
<postfield name=\"letter\" value=\"$(letter)\"/>
<postfield name=\"ws\" value=\"letter\"/>
</go>
</anchor>";
}
if($wapsidemode=="letter"){
$a = file_get_contents('http://www.lyricsdownload.com/'.$letit.'-full_list.html');
$a = get_string_between($a,"<ul imagesrc=\"http://www.lyricsdownload.com/images/arrow_r.gif\" style=\"margin-left: 20\">","</ul>");
$a = str_replace("<li><a class=\"txt_1\"","<a ",$a);
$a = str_replace("</a>","</a><br/>",$a);
$a = str_replace("</li>","",$a);
$a = str_replace("<ul imagesrc=\"http://www.lyricsdownload.com/images/arrow_r.gif\" style=\"margin-left: 20\">","",$a);
$a = str_replace("</ul>","</a><br/>",$a);
$a = str_replace("&","&",$a);
$links = extract_URLs($a);
$list= "";
foreach ($links as $v) {
$list .= "<a href=\"lyrics.php?s=".myhtmlentities($v[1])."&ws=singer&sid=".$sid."\">".myhtmlentities($v[0])."</a><br/>";
}
$fulllist = explode("<br/>",$list);
print "Lyrics<br/>";
print "Page:".($page-10)." / ".$page."";
print count($fulllist)."<br/>******<br/>";
for ($i = $page-1; $i < $page+10; $i++) {
print $fulllist[$i]."<br/>";
}
print "------<br/>";
print "<a href=\"lyrics.php?letter=".$letit."&page=".($page + 1)."&ws=".$ws."&sid=".$sid."\">more...</a><br/>";
print "<a href=\"lyrics.php?letter=".$letit."&page=".($page - 1)."&ws=".$ws."&sid=".$sid."\">back...</a><br/>";
print "<a href=\"lyrics.php?sid=".$sid."\">Lyrics Index</a>";
}
$singer = $_REQUEST["s"];
if($wapsidemode=="singer"){
$sa = file_get_contents('http://www.lyricsdownload.com/'.$singer.'');
$sa = str_replace("<ul imagesrc=\"http://www.lyricsdownload.com/images/arrow_r.gif\" style=\"margin-left: 20\">","<ul imagesrc=\"arrow_r.gif\">",$sa);
$sa = str_replace("<ul imagesrc=\"http://www.lyricsdownload.com/images/arrow_r.gif\" style=\"margin-left: 5\">","<ul imagesrc=\"arrow_r.gif\">",$sa);
$sa = get_string_between($sa,"<ul imagesrc=\"arrow_r.gif\">","</ul>");
$links = extract_URLs($sa);
$list= "";
foreach ($links as $v) {
$v = str_replace("<font size=2>","",$v);
$v = str_replace("</font>","",$v);
$list .= "<a href=\"lyrics.php?song=".myhtmlentities($v[1])."&ws=viewlyrics&sid=".$sid."\">".myhtmlentities($v[0])."</a><br/>";
}
$fulllist = explode("<br/>",$list);
$page = trim($_REQUEST["page"]);
print "Lyrics ";
print ($page - 10)." / ".$page." of ";
print count($fulllist)."<br/>------<br/>";
for ($i = $page-1; $i < $page+10; $i++) {
print $fulllist[$i]."<br/>";
}
$firstletter = substr($s, 0, 1);
print "------<br/>";
print "<a href=\"lyrics.php?ws=".$ws."&s=".$s."&page==".($page + 1)."&sid=".$sid."\">more...</a><br/>";
print "<a href=\"lyrics.php?ws=".$ws."&s=".$s."&page==".($page - 1)."&sid=".$sid."\">back...</a><br/>";
print "<a href=\"lyrics.php?ws=".$ws."&letter=".$firstletter."&sid=".$sid."\">Back to [".$firstletter."]</a><br/>";
print "<a href=\"lyrics.php?sid=".$sid."\">Lyrics Index</a>";
}
$song = $_REQUEST["song"];
if($wapsidemode=="viewlyrics"){
$saaa = file_get_contents('http://www.lyricsdownload.com/'.$song.'');
$saaa = str_replace("\n", "", $saaa);
$saaa = str_replace("\t", "", $saaa);
$saaa = get_string_between($saaa,"<center><font class=\"txt_1\">","</font>");
$saaa = str_replace("<br /><br />","<br/>",$saaa);
$saaa = str_replace("<center><font class=\"txt_1\">","",$saaa);
$saaa = str_replace("</font></center>","",$saaa);
$saaa = str_replace("&","&",$saaa);
echo $saaa;
$firstletter = substr($song, 0, 1);
print "<br/>------<br/><anchor>Back to singer<prev/></anchor><br/>";
print "<a href=\"lyrics.php?ws=letter&letter=".$firstletter."&sid=".$sid."\">Back to [".$firstletter."]</a><br/>";
print "<a href=\"lyrics.php?sid=".$sid."\">Lyrics Index</a>";
}
?>
</p>
</card>
</wml>
its quite easy to do api scripts once u get in to it 😉 ..but i checked Lyricsfly Lyrics API, database access to search for music artist and song title, protocol REST with XML document and it seems to only explain how to bring the lyrics page for a certain song/artist.. how did u do it on lyricsfly.mobi where if u search only the Artist it'l bring a list of songs (as links to lyrics page) from that artist??
dshadow wrote: here is a working mp3 search script from 4shared xtmobi.com/mp3
can u share the script?