viewgit/inc/functions.php:22 Function utf8_encode() is deprecated [8192]

creates a command line query tool, a=chris

Chris Pollett [2011-08-04 07:Aug:th]
creates a command line query tool, a=chris
Filename
bin/arc_tool.php
bin/fetcher.php
bin/queue_server.php
diff --git a/bin/arc_tool.php b/bin/arc_tool.php
old mode 100644
new mode 100755
index e1761d2be..5b94928b3
--- a/bin/arc_tool.php
+++ b/bin/arc_tool.php
@@ -31,6 +31,8 @@
  * @filesource
  */

+if(php_sapi_name() != 'cli') {echo "BAD REQUEST"; exit();}
+
 /** Calculate base directory of script @ignore*/
 define("BASE_DIR", substr(
     dirname(realpath($_SERVER['PHP_SELF'])), 0,
@@ -109,12 +111,6 @@ class ArcTool implements CrawlConstants
     {
         global $argv;

-        if(isset($_SERVER['DOCUMENT_ROOT']) &&
-            strlen($_SERVER['DOCUMENT_ROOT']) > 0) {
-            echo "BAD REQUEST";
-            exit();
-        }
-
         if(!isset($argv[1])) {
             $this->usageMessageAndExit();
         }
@@ -362,4 +358,4 @@ class ArcTool implements CrawlConstants

 $arc_tool =  new ArcTool();
 $arc_tool->start();
-
+?>
diff --git a/bin/fetcher.php b/bin/fetcher.php
index 86b377874..e243097b7 100755
--- a/bin/fetcher.php
+++ b/bin/fetcher.php
@@ -31,6 +31,9 @@
  * @filesource
  */

+
+if(php_sapi_name() != 'cli') {echo "BAD REQUEST"; exit();}
+
 /**
  * Calculate base directory of script
  * @ignore
@@ -39,7 +42,7 @@ define("BASE_DIR", substr(
     dirname(realpath($_SERVER['PHP_SELF'])), 0,
     -strlen("/bin")));

-ini_set("memory_limit","600M"); //so have enough memory to crawl big pages
+ini_set("memory_limit","750M"); //so have enough memory to crawl big pages

 /** Load in global configuration settings */
 require_once BASE_DIR.'/configs/config.php';
diff --git a/bin/queue_server.php b/bin/queue_server.php
index ce782d0cd..1ba6c6477 100755
--- a/bin/queue_server.php
+++ b/bin/queue_server.php
@@ -31,6 +31,9 @@
  * @filesource
  */

+if(php_sapi_name() != 'cli') {echo "BAD REQUEST"; exit();}
+
+
 /** Calculate base directory of script
  * @ignore
  */
ViewGit