[ Index ]

PHP Cross Reference of Crawler

title

Body

[close]

/ -> config.php (source)

   1  <?php
   2  /**
   3   * 
   4   * Crawler Configuration File
   5   *
   6   */
   7   
   8   /**
   9    * MySQL Connection Settings
  10    */
  11   $mysql_server = 'localhost';
  12   $mysql_user = '';
  13   $mysql_pass = ''; 
  14   $mysql_db = '';
  15  
  16  /**
  17   * Local Timezone
  18   */
  19   $timezone = 'America/New_York';
  20   
  21  /**
  22   *
  23   * Domains to crawl separated by commas.  Crawler will verify that a link resides in one of the domains listed before adding it to the queue.
  24   *
  25   * Example:  "www.fcc.gov, broadband.com"
  26   *
  27   */
  28  $domains = "www.fcc.gov, auctionbidding.fcc.gov, auctionbidding2.fcc.gov, auctionfiling.fcc.gov, auctionfiling2.fcc.gov, auctionresults.fcc.gov, auctions.fcc.gov, auctions2.fcc.gov, auctionsignon.fcc.gov, auctionsignon2.fcc.gov, dtvsupport.fcc.gov, ecfsdocs.fcc.gov, esupport.fcc.gov, eteam.fcc.gov, fjallfoss.fcc.gov, gis.fcc.gov, hauk.fcc.gov, hraunfoss.fcc.gov, licensing.fcc.gov, publicsafety.fcc.gov, search.fcc.gov, search2.fcc.gov, specialreports.fcc.gov, ulsbatch.fcc.gov, wireless.fcc.gov, wireless2.fcc.gov"; 
  29  
  30  /**
  31   * No Need to Edit below here
  32   */
  33  
  34   
  35   /**
  36   * Check to ensure settings are not defaults
  37   */
  38  
  39   if ($mysql_server == ''|$mysql_user == ''|$mysql_pass==''|$mysql_db=='') die('You must enter MySQL information in config.php before continuing');
  40   
  41   if ($domains == '') die('You must enter one or more domains in config.php before continuing');
  42   
  43  /**
  44   * Initiate database connection
  45   */
  46  $db=mysql_connect ($mysql_server, $mysql_user, $mysql_pass) or die ('I cannot connect to the database because: ' . mysql_error());
  47  
  48  /**
  49   * Select DB
  50   */
  51  mysql_select_db ($mysql_db);
  52  
  53  /**
  54   * Set the timezone to properly note timestamps
  55   */
  56  date_default_timezone_set($timezone);
  57  
  58  
  59  
  60  ?>


Generated: Thu Jun 3 17:10:09 2010 Cross-referenced by PHPXref 0.7