includes/http.php
changeset 847 28d5049803f1
parent 801 eb8b23f11744
child 894 83d180d87f3c
--- a/includes/http.php	Thu Feb 26 01:28:18 2009 -0500
+++ b/includes/http.php	Sat Feb 28 14:38:10 2009 -0500
@@ -214,7 +214,8 @@
       
     $newline = "\r\n";
     $php_ver = PHP_VERSION;
-    $this->add_header('User-Agent', "PHP/$php_ver (Server: {$_SERVER['SERVER_SOFTWARE']}; automated bot request)");
+    $server = ( isset($_SERVER['SERVER_SOFTWARE']) ) ? "Server: {$_SERVER['SERVER_SOFTWARE']}" : "CLI";
+    $this->add_header('User-Agent', "PHP/$php_ver ({$server}; automated bot request)");
   }
   
   /**