Created
October 19, 2012 09:48
-
-
Save brunsgaard/3917214 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
require_once 'intro.php'; | |
$x = new GSB_Updater($storage, $network, $logger); | |
// get new chunks | |
$x->downloadData($gsblists, FALSE); | |
// zap outdated fullhash definitions (they are only good for 45m) | |
$storage->fullhash_delete_old(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(-1); | |
ini_set('error_log', '/dev/stderr'); | |
ini_set('max_execution_time', -1); | |
ini_set('memory_limit', -1); | |
date_default_timezone_set('UTC'); | |
#define('BASE_DIR', str_replace('//','/',dirname(__FILE__)).'/'); | |
set_include_path('.' . PATH_SEPARATOR . '../lib'); | |
// turn off output buffering | |
//ob_end_flush(); | |
require_once 'lib/GSB_Updater.php'; | |
require_once 'lib/GSB_Request.php'; | |
require_once 'GSB_Storage.php'; | |
require_once 'GSB_Exception.php'; | |
require_once 'GSB_Logger.php'; | |
$api = 'ABQIAAAAMqZLBC2NVJWwikyKSAXBKBQWTqr7Y7-tVGpbcTnwRGDOjNXnlQ'; | |
$gsblists = array('goog-malware-shavar', 'googpub-phish-shavar'); | |
$dbh = new PDO('mysql:host=127.0.0.1;dbname=SiteBeak', 'root', '6xgj95ty'); | |
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); | |
$storage = new GSB_Storage($dbh); | |
$network = new GSB_Request($api); | |
$logger = new GSB_Logger(5); |
Author
brunsgaard
commented
Oct 19, 2012
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment