Example #1
0
?>
	</div>
</div>
</div>

<div class='clear'> </div>
<div style='text-align:center;margin-bottom:20px;'>

	<div><b>Current Domains: </b><?php 
echo $domains;
?>
</div> 
	<div><b>Current Crawl Tag: </b><?php 
echo $crawl_tag;
?>
</div> 
	<?php 
$sql = 'SELECT title, url FROM urls WHERE crawled = "1" AND crawl_tag = "' . $crawl_tag . '" ORDER BY ID DESC LIMIT 1';
$last = mysql_row_array(mysql_query($sql));
?>
	<div><b>Last Page Crawled: </b><?php 
echo $last['title'];
?>
 (<?php 
echo "<a href='{$last['url']}' target='_new'>{$last['url']}</a>";
?>
) </div> 
</div>

</body>
Example #2
0
/**
 * Checks to see if a given URL is already in the pages table
 *
 * @params string $link URL to check
 * @return bool true if URL exists, false if not found
 */
function have_url($url, $crawl_tag)
{
    $url = mysql_row_array(mysql_select('urls', array('url' => urldecode($url))));
    if (sizeof($url) == 0) {
        return false;
    } else {
        return $url['ID'];
    }
}