hi friends i need help in Mp3 Search Engine Script i have script which have make url like this http://www.mp3r.info/index.php?search=ravan+movie this script working fine but i want to edit this url i want this site url like this http://www.mp3r.info/index.php?song=ravan+movie but when i change ?search= this to ?song= script not working when people search song script dont add song in song list can any one help me in this ware i can change value and script working and script make url like this http://www.mp3r.info/index.php?song=ravan+movie
I think you need to use mod rewrite in a .htaccess file to rewrite search to song. Alternatively, you can go into the code and change $_GET['search'] to $_GET['song']. I think I understand what you were getting at. Tell me if I'm wrong.
in this scriept dont have SQL this site all keyword going to add in search.txt file when i change $_GET['search'] to $_GET['song']. url going to like this http://www.mp3r.info/index.php?song=ravan+movie but song or keyword not add in search.txt thants the problem see Oregnal index.php <?php require_once('config.inc.php'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <html> <html> <head> <title><?php if($_GET['search'] == ''){ echo $CFG['site_name'] . ' | ' . $CFG['title']; } else { echo $_GET['search'] .' '. $CFG['site_name'] .' | '. $_GET['search'] .' '. $CFG['title']; } ?></title> <meta name="keywords" content=" <? echo $_GET['search'] ?> mp3 song, download mp3,play, listen, download, free mp3 songs,lyrics "> <meta name="description" content="download mp3 free songs play and download full movie songs album mp3 music "> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <LINK href="style.css" rel="stylesheet" type="text/css"> <SCRIPT LANGUAGE="JavaScript"> <!-- function popitup(url) { newwindow=window.open(url + "&id=" + new Date().getTime(),'name','height=130,width=300'); if (window.focus) {newwindow.focus()} return false; } // --> </script> <link rel="search" type="application/opensearchdescription+xml" title="spactor" href="<?php echo $CFG['domain'];?>music.xml" /> <script type="text/javascript"> function addEngine() { if (window.external && ("AddSearchProvider" in window.external)) window.external.AddSearchProvider("<?php echo $CFG['domain'];?>music.xml"); else alert("Your browser don`t have that plug-in"); } </script> </head> <body> <?php if (!isset($_GET[search]) OR $_GET[search] == "") { //---------------- Home Page --------------- ?> <table height="80%" align="center" valign="middle"><tr><td align="center"> <img src="images/logo.jpg"><br> <BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0"> <p align="center"> </BODY><BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0"></BODY> <div align="center"> <table border="0" width="41%" id="table1" cellspacing="0" cellpadding="0"> <tr> <td> </td> <td> </td> </tr> </table> <p> </div> <BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0"> </p> </BODY><p> <form method="GET" action="index.php"> <table><tr><td> <input type="text" name="search"></td><td> <INPUT type=submit value="Search!"></td></tr></table> </form> <?php echo "<center><b> " . file_get_contents("c.txt") . " </b>Songs has been Found from our Search Engine<br />Since 1st April 2008</center>"; ?> </td></tr> <tr><td align="center"> <br /><br /> <center> <br /><p align="center"> <br> </p> <table width="780" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <center> <p align="center"> </p> <? include_once "latestsearch.php"; ?></center> </center> </td> </tr> </table> </td></tr> </table> <?php //--------------EndHome Page --------------- }else{ ?> <table width="675" border="0" align="center" cellpadding="0" cellspacing="0"> <tr><td align="left" width="180"> <a href="index.php"><img src="images/logo_small.jpg" border="0"></a> </td> <td align="right"> <?php if(!$_GET[page]) { include("searchtracking.php"); } ?> </center> </td></tr></table> <hr width="675"> <BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0"> <p align="center"> </BODY><BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0"></BODY> <div align="center"> <table border="0" width="41%" id="table1" cellspacing="0" cellpadding="0"> <tr> <td> </td> <td> </td> </tr> </table> </div> <BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0"> </p> </BODY> <p align="center"> <?php //------------------------- $srch = preg_replace('/ /', '+', $_GET[search]); //-----GET PAGE NUMBER $lstp = explode("<span class=\"currentPage\">", $gurl1); $lstp = explode("</div>", $lstp[1]); $lstp = explode("'>", $lstp[0]); $i=0; while ($i <= 8) { $pe = $lstp[$i]; $pe = explode("</span>", $pe); $pe = explode("</a>", $pe[0]); $pe = $pe[0]; if(is_numeric($pe)){ $bgst = $pe; } $i++; } $pe = $bgst; if ($pe > 100) { $pe = 100; } //----END PAGE NUMBER //------GET CURRENT PAGE $cpage = $_GET['page']; if (!isset($cpage)) { $cpage = 1; } //---END CURRENT GET PAGE $matches = explode("<div class=\"resultsTitle\">", $gurl); $matches = explode("</div>", $matches[2]); $matches = explode("on eSnips", $matches[0]); ?><p> <center> </center> <br> </p> <table width="675" border="0" align="center" cellpadding="0" cellspacing="0"> <tr><td> <br> Play <?php echo $_GET['search']; ?> MP3 </td><td align="right"> <form method="GET" action="index.php"> <table><tr><td> <input type="text" name="search" value="<?php echo $_GET['search']; ?>"></td><td> <INPUT type=submit value="Search!"></td></tr></table> </form> </td></tr></table> <?php $i=1; if (!isset($matches[1])) { $r=10; }else{ echo "<center>Some Text!</center>"; } while ($i < $r) { $aud = explode("<a class=\"CommandLink\" href='/doc/", $gurl); $aud = explode("</a>", $aud[$i]); //Change to differ track. $Tname = explode("<strong>", $aud[0]); $Tname = explode("</strong>", $Tname[1]); $Tlink = explode("/", $aud[0]); //---- track details - just loop it! $Tname = $Tname[0]; $Tlink = $Tlink[0]; if ($i == 1 or $i == 3 or $i == 5 or $i == 7 or $i == 9){ $col = "#f3faff"; }else{ $col = "#e6edf3"; } echo " <table width=\"675\" border=\"0\" align=\"center\" cellpadding=\"2\" cellspacing=\"2\" bgcolor=\"$col\"> <tr> <td width=\"525\"><b>$Tname</b></font></td> <td width=\"75\" align=\"right\"> "; ?> <script language="javascript" type="text/javascript"> <!-- function popitup(url) { newwindow=window.open(url,'name','height=450,width=500'); if (window.focus) {newwindow.focus()} return false; } // --> </script> <a href="realdestination.html" onclick="return popitup('')" >Listen</a> <?php echo " </td> <td width=\"75\" align=\"right\">"; ?> <script type="text/javascript">document.write("<a target=\"blank\" href='download.php?file=<?php echo $Tlink; ?>&id=" + new Date().getTime() + "'>Play </a>");</script> <?php echo " </td> </table> "; $i++; } if (!isset($matches[1])) { echo "<p><br><table width=\"675\" border=\"0\" align=\"center\"><tr><td align=\"left\"><b>Page: </b> "; $i=1; $cp = $cpage - 1; if ($cpage > 1) { echo "<a href=\"?search=" . $srch . "&page=" . $cp . "\"><< Preview</a>"; } while ($i <= $pe) { if ($i == $cpage) { echo "<a href=\"?search=" . $srch . "&page=" . $i . "\"><b>" . $i . "</b></a> "; }else{ echo "<a href=\"?search=" . $srch . "&page=" . $i . "\">" . $i . "</a> "; } $i++; } $cp = $cpage + 1; if ($cpage < $pe) { echo "<a href=\"?search=" . $srch . "&page=" . $cp . "\">Next >></a>"; } ?> </td></tr></table> <?php } ?> <p> <center> <p align="center"> <br> </p><br /> <hr width="675"> <table width="780" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <center> <p align="center"> <font color="#ff0000" face="Verdana" size="1"><br> </font></p> <? include_once "latestsearch.php"; ?></center> </center> </td> </tr> </table> <br /></center> <p align="center"> <?php } ?> </p> Code (markup): latestsearch.php <?php $f1le = 'search.txt'; if(@filesize($f1le) > 1) { $fp0 = fopen($f1le, "r"); $howmuch = 500; $pos = -2; $hitung = 0; ?> Latest <?=$howmuch?> Search <p> <?php //$crotz = "<ul>"; do { fseek($fp0, $pos, SEEK_END); $pos--; //$crotz .= fgetc($fp0); if(fgetc($fp0) == "\n") { //$crotz .= "<li>"; $crotz .= '<a class="latest" href="'; $t3mp = fgets($fp0); $t3mp = str_replace('[keywords]:','',$t3mp); $t3mp = str_replace("\n","",$t3mp); $crotz .= "http://www.mp3r.info/index.php?song=".urlencode($t3mp).""; $crotz .= "\">".htmlspecialchars($t3mp)."</a>"; if($hitung < ($howmuch-1)) $crotz .= " | "; //$crotz .- '</li>'; $hitung++; } } while($hitung < $howmuch && !feof($fp0)); fclose($fp0); //$crotz .= "</ul>"; echo $crotz; } ?> </p> <!-- </div> --> Code (markup):
You can try this! If not better Hire a Dev instead of messing with that! Also your latestsearch.php seems to be changed <?php require_once('config.inc.php'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <html> <html> <head> <title> <?php if($_GET['song'] == '') { echo $CFG['site_name'] . ' | ' . $CFG['title']; } else { echo $_GET['song'] .' '. $CFG['site_name'] .' | '. $_GET['song'] .' '. $CFG['title']; } ?></title> <meta name="keywords" content=" <? echo $_GET['song'] ?> mp3 song, download mp3,play, listen, download, free mp3 songs,lyrics "> <meta name="description" content="download mp3 free songs play and download full movie songs album mp3 music "> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <LINK href="style.css" rel="stylesheet" type="text/css"> <SCRIPT LANGUAGE="JavaScript"> <!-- function popitup(url) { newwindow=window.open(url + "&id=" + new Date().getTime(),'name','height=130,width=300'); if (window.focus) {newwindow.focus()} return false; } // --> </script> <link rel="search" type="application/opensearchdescription+xml" title="spactor" href="<?php echo $CFG['domain'];?>music.xml" /> <script type="text/javascript"> function addEngine() { if (window.external && ("AddSearchProvider" in window.external)) window.external.AddSearchProvider("<?php echo $CFG['domain'];?>music.xml"); else alert("Your browser don`t have that plug-in"); } </script> </head> <body> <?php if (!isset($_GET[song]) OR $_GET[song] == "") { //---------------- Home Page --------------- ?> <table height="80%" align="center" valign="middle"><tr><td align="center"> <img src="images/logo.jpg"><br> <BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0"> <p align="center"> </BODY><BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0"></BODY> <div align="center"> <table border="0" width="41%" id="table1" cellspacing="0" cellpadding="0"> <tr> <td> </td> <td> </td> </tr> </table> <p> </div> <BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0"> </p> </BODY><p> <form method="GET" action="index.php"> <table><tr><td> <input type="text" name="song"></td><td> <INPUT type=submit value="Search!"></td></tr></table> </form> <?php echo "<center><b> " . file_get_contents("c.txt") . " </b>Songs has been Found from our Search Engine<br />Since 1st April 2008</center>"; ?> </td></tr> <tr><td align="center"> <br /><br /> <center> <br /><p align="center"> <br> </p> <table width="780" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <center> <p align="center"> </p> <? include_once "latestsearch.php"; ?></center> </center> </td> </tr> </table> </td></tr> </table> <?php //--------------EndHome Page --------------- }else{ ?> <table width="675" border="0" align="center" cellpadding="0" cellspacing="0"> <tr><td align="left" width="180"> <a href="index.php"><img src="images/logo_small.jpg" border="0"></a> </td> <td align="right"> <?php if(!$_GET[page]) { include("searchtracking.php"); } ?> </center> </td></tr></table> <hr width="675"> <BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0"> <p align="center"> </BODY><BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0"></BODY> <div align="center"> <table border="0" width="41%" id="table1" cellspacing="0" cellpadding="0"> <tr> <td> </td> <td> </td> </tr> </table> </div> <BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0"> </p> </BODY> <p align="center"> <?php //------------------------- $srch = preg_replace('/ /', '+', $_GET[song]); //-----GET PAGE NUMBER $lstp = explode("<span class=\"currentPage\">", $gurl1); $lstp = explode("</div>", $lstp[1]); $lstp = explode("'>", $lstp[0]); $i=0; while ($i <= 8) { $pe = $lstp[$i]; $pe = explode("</span>", $pe); $pe = explode("</a>", $pe[0]); $pe = $pe[0]; if(is_numeric($pe)){ $bgst = $pe; } $i++; } $pe = $bgst; if ($pe > 100) { $pe = 100; } //----END PAGE NUMBER //------GET CURRENT PAGE $cpage = $_GET['page']; if (!isset($cpage)) { $cpage = 1; } //---END CURRENT GET PAGE $matches = explode("<div class=\"resultsTitle\">", $gurl); $matches = explode("</div>", $matches[2]); $matches = explode("on eSnips", $matches[0]); ?><p> <center> </center> <br> </p> <table width="675" border="0" align="center" cellpadding="0" cellspacing="0"> <tr><td> <br> Play <?php echo $_GET['song']; ?> MP3 </td><td align="right"> <form method="GET" action="index.php"> <table><tr><td> <input type="text" name="song" value="<?php echo $_GET['song']; ?>"></td><td> <INPUT type=submit value="Search!"></td></tr></table> </form> </td></tr></table> <?php $i=1; if (!isset($matches[1])) { $r=10; }else{ echo "<center>Some Text!</center>"; } while ($i < $r) { $aud = explode("<a class=\"CommandLink\" href='/doc/", $gurl); $aud = explode("</a>", $aud[$i]); //Change to differ track. $Tname = explode("<strong>", $aud[0]); $Tname = explode("</strong>", $Tname[1]); $Tlink = explode("/", $aud[0]); //---- track details - just loop it! $Tname = $Tname[0]; $Tlink = $Tlink[0]; if ($i == 1 or $i == 3 or $i == 5 or $i == 7 or $i == 9){ $col = "#f3faff"; }else{ $col = "#e6edf3"; } echo " <table width=\"675\" border=\"0\" align=\"center\" cellpadding=\"2\" cellspacing=\"2\" bgcolor=\"$col\"> <tr> <td width=\"525\"><b>$Tname</b></font></td> <td width=\"75\" align=\"right\"> "; ?> <script language="javascript" type="text/javascript"> <!-- function popitup(url) { newwindow=window.open(url,'name','height=450,width=500'); if (window.focus) {newwindow.focus()} return false; } // --> </script> <a href="realdestination.html" onclick="return popitup('')" >Listen</a> <?php echo " </td> <td width=\"75\" align=\"right\">"; ?> <script type="text/javascript">document.write("<a target=\"blank\" href='download.php?file=<?php echo $Tlink; ?>&id=" + new Date().getTime() + "'>Play </a>");</script> <?php echo " </td> </table> "; $i++; } if (!isset($matches[1])) { echo "<p><br><table width=\"675\" border=\"0\" align=\"center\"><tr><td align=\"left\"><b>Page: </b> "; $i=1; $cp = $cpage - 1; if ($cpage > 1) { echo "<a href=\"?song=" . $srch . "&page=" . $cp . "\"><< Preview</a>"; } while ($i <= $pe) { if ($i == $cpage) { echo "<a href=\"?song=" . $srch . "&page=" . $i . "\"><b>" . $i . "</b></a> "; }else{ echo "<a href=\"?song=" . $srch . "&page=" . $i . "\">" . $i . "</a> "; } $i++; } $cp = $cpage + 1; if ($cpage < $pe) { echo "<a href=\"?song=" . $srch . "&page=" . $cp . "\">Next >></a>"; } ?> </td></tr></table> <?php } ?> <p> <center> <p align="center"> <br> </p><br /> <hr width="675"> <table width="780" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <center> <p align="center"> <font color="#ff0000" face="Verdana" size="1"><br> </font></p> <? include_once "latestsearch.php"; ?></center> </center> </td> </tr> </table> <br /></center> <p align="center"> <?php } ?> </p> PHP: