#!/usr/bin/php <?php require_once 'functions.php'; //爬虫主程序,利用linux的shell实现多线程 //获取第$page页的源码, $page = $argv[1]; get_html_code($page);
$result = mysql_query("select * FROM banners") or die(mysql_error()); while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { ?> <tr bgcolor="#ffffff"> <td><font size="2"><?php echo $row['banner_id']; ?> </font></td> <td><font size="2"><?php echo $row['name']; ?> </font></td> <td><textarea onfocus="this.select()" rows='3' cols='35'><?php echo get_html_code($row['banner_id']); ?> </textarea></td> <td><textarea onfocus="this.select()" rows='3' cols='35'><?php echo get_stats_html_code($row['banner_id']); ?> </textarea></td> </tr> <?php } ?> </table>