Location: PHPKode > projects > rapidshareBot > rapidsharebot/music-top-100.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Top 100 music mp3 download searches - <?php echo $_SERVER['SERVER_NAME']; ?></TITLE>
<meta name="robots" content="all" />
<LINK href="/" rel=canonical>
<link rel="shortcut icon" href="favicon.ico">
<link href="feed.php" rel="alternate" type="application/rss+xml" title="Free Downloads - <?php echo $_SERVER['SERVER_NAME']; ?>" />

<META http-equiv=content-type content="text/html; charset=utf-8">
<link href="style.css" rel="stylesheet">
</HEAD>
<BODY>
<A href="http://freephpwebscripts.appspot.com/rapidsharebot.html" class='t' style="float:right;color:red;" title="Make money hosting your own download site for free." target="_blank"><blink>Make money.</blink></A>
<br/>
<center>
<a href="./"><img src="img/logo.jpg" border="0" title="free download <?php echo $_SERVER['SERVER_NAME']; ?>"></a>
<script>
function form_validate(formName){
    if( (eval("document."+formName+".q.value") == ""))
    {
        alert("Please enter the some search term/s.");
        return false;
    }
  }
</script>
<table class="lnav" cellpadding="5" cellspacing="0">
<tbody><tr>
<td></a></td>
<td>
<form name="search" id="search" action="search.php" method="get" onsubmit="return form_validate('search');">
<table cellpadding="3" cellspacing="0">
<tbody><tr>
<td>&nbsp;&nbsp;<input name="q" class="input_text" size="26" maxlength="512" value="" style="height:30px;width:500px;font-size:23px"></td>
<td><input id="fj" class="input_submit" value="   Search   " type="submit" style="color:#1558AF;font-size:20px;height:35;width:130;"></td>
<td><!--<a href="/advanced_search?q={{ query }}&amp;l={{ where }}">Advanced Search</a>--></td>
</tr>
<tr valign="top">
<td class="label">&nbsp;&nbsp;&nbsp;&nbsp;<b>What:</b> Your Search Terms.</td>
</tr>
</tbody></table>
</form>
</td>
</tr>
</tbody></table>
<h1>Top 100 music mp3 download searches.</h1><br/>

<br/>
<table>
<td>
<?php
include('functions.inc.php');

$key = "music_top_100";
$url = 'http://filecrop.com/top-music.php';
if( $_SERVER['SERVER_NAME'] == 'localhost'){
$url = 'html/top-music.php.html';
}
$cache = new JG_Cache('./cache');
$musics = $cache->get($key, 3600*24*7);
if ($musics === FALSE)
   {

   $html = fetch_url($url, 'http://google.com/');
$html = str_get_html($html);
$musics = $html->find('ol', 0);
$links = explode("\n", trim( strip_tags($musics->innertext), "\n" ) );
ob_start();
foreach ($links as $link) {
$parts = explode('by', $link);
echo '<a href="search.php?q=' . urlencode(trim($parts[0]) . ' mp3') . '" title="Download free ' . $parts[0] . ' mp3">' . $parts[0] . '</a>' .
' by <a href="search.php?q=' . urlencode(trim($parts[1]) . ' mp3') . '" title="Download free ' . $parts[1] . ' mp3">' . $parts[1] . '</a><br/>';
}
$music_links = ob_get_contents();
ob_end_flush();
$cache->set($key, $music_links);
}
else echo $musics;
?>
</td>
</table>
</center>
<br/><h1></h1>
<?php include 'footer.html'; ?>
</BODY>
</HTML>
Return current item: rapidshareBot