Location: PHPKode > projects > rapidshareBot > rapidsharebot/recent.php
<?php
include('functions.inc.php');

if (isset($_GET['id'])){
$id = $_GET['id'];
if ($id == '') $id = 'US';
}else $id = 'US';

$url = 'http://filecrop.com/' . $id . '/';
if( $_SERVER['SERVER_NAME'] == 'localhost'){
$url = 'html/filecrop-US.htm';
}

$html = fetch_url($url, 'http://google.com/');

$html = str_get_html($html);
$recents = $html->find('div[id=indexlinks]', 0);
$links = $recents->find('a');
foreach ($links as $link) {
$link ->href = 'search.php?q=' . urlencode($link ->title);
//$recents[] = $link ->title;
}
$recents = $html->find('div[id=indexlinks]', 0);


?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Recent searchs for region - <?php echo $id . ' - ' . $_SERVER['SERVER_NAME']; ?></TITLE>
<meta name="Description" content="Recent searchs for region - <?php echo $id; ?>" />
<meta name="Keywords" content="<?php echo implode(", ", explode(" | ", strip_tags($recents))); ?>" />
<meta name="robots" content="all" />
<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']; ?>" />
<link href="style.css" rel="stylesheet">

</head>
<body style="width: 750px;">
<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>Recent searchs for region - <?php echo $id; ?></h1></center><br/><br/>
<table>
<td>
<?php echo $recents; ?>
</td>
</table>
<br/><br/><h1></h1>
<?php include "footer.html"; ?>
</body>
</html>
Return current item: rapidshareBot