Source code of file config.inc.php
from the PHP SETI@home web monitor.

<?php
// PHP SETI@home Web Monitor (phpsetimon).
// Copyright 2003, 2004 by Mario A. Valdez-Ramirez
// http://www.mariovaldez.net/

// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.

// You can contact Mario A. Valdez-Ramirez by email
// at mario@mariovaldez.org or paper mail at
// Olmos 809, San Nicolas, NL. 66495, Mexico.

//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

// What language to use (en = English, es = Spanish)...
$ps_cfg_language "en";

// Are using PHP with GD graphics support?
// If not, disable all the following vars:
// ps_cfg_createzoom, ps_cfg_createbigmap and ps_cfg_creategauss.
// If yes, you can enable all these variables to generate the graphics.
$ps_cfg_createzoom true;
$ps_cfg_createbigmap true;
$ps_cfg_creategauss true;            // unfinished

// Are you using GD 2.0.x? If yes, you can enable
// truecolor graphic processing, which render better pictures.
// (Most Linux distributions newer than 2002 already use GD 2).
$ps_cfg_truecolor true;

// Do we have ps (Unix/Linux) or tlist.exe (Win2K)?
// For Unix/Linux and WinXP, set to true...
// For Windows 2000, only if you've installed the Support Tools...
$ps_cfg_cangetpid true;

// Set to true if the *local* client don't create pid.sah files
// (like Windows graphical clients).
$ps_cfg_ignorepidfile false;

// Enable direct link to the SkyView virtual telescope.
$ps_cfg_linkskyview true;

// Enable downloading from the SkyView virtual telescope.
$ps_cfg_getskyview true;

// Enable the record of name and location of units.
$ps_cfg_createhistory true;
$ps_cfg_renderhistory true;

// If this web server is behind a proxy
// (only used to download SkyView maps to the server).
$ps_cfg_useproxy false;
$ps_cfg_proxyaddress "192.168.0.1";
$ps_cfg_proxyport 3128;

// The full default skymaps are around 150K. After a while they
// use lot of disk space. By default only latest skymaps are
// keep. ps_cfg_maxmapage defines the max age allowed in seconds.
// Note: if you use a very small value, even current maps are deleted.
$ps_cfg_keepbigmaps false;
$ps_cfg_maxmapage 345600;       // 345600 = 4 days.


//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

// Parameters when linking or donwloading from SkyView.
$ps_cfg_skyview_color 3;     // 1-Red temperature, 2-Stern, 3-BGRY, 4-Prism, 5-Green linear.
$ps_cfg_skyview_log false;   // Log or linear light scale.
$ps_cfg_skyview_grid true;   // Grid or no grid.

// These affect the size of the zoom skymap
// and the gaussian chart.
$ps_zoommap_Xsize "350";
$ps_zoommap_Ysize "350";
$ps_gaussgraph_Xsize "300";
$ps_gaussgraph_Ysize "100";
$ps_cfg_horlayout false;
if (
$ps_cfg_horlayout) { $ps_cfg_mapframeX 980; } else { $ps_cfg_mapframeX 760; }
$ps_cfg_mapframeY 480;
$ps_cfg_procbarX 250;


//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

// You should not modify the following variables,
// unless you know what you are doing.

$ps_cfg_mapdir "maps/";
$ps_cfg_zoomdir "zooms/";
$ps_cfg_skyviewdir "skyview/";
$ps_cfg_historydir "history/";
$ps_cfg_gaussdir "gauss/";
$ps_cfg_imagesdir "images/";
$ps_cfg_langfiles "lang/";

$ps_sourcemap_filename $ps_cfg_imagesdir "skymap_rectangular_projection2.png";
$ps_sourcemap_Xsize 3242;                    // Source skymap size (pixels).
$ps_sourcemap_Ysize 720;
$ps_sourcemap_maxXminutes 1440;              // Source skymap range (minutes).
$ps_sourcemap_maxYminutes 4800;
$ps_sourcemap_Xoffset 0;                     // Source skymap center offset (pixels).
$ps_sourcemap_Yoffset = -3;

$ps_zoomsections_Xtotal 24;                  // Zoom fraction.
$ps_zoomsections_Ytotal = ($ps_zoomsections_Xtotal / ($ps_sourcemap_Xsize $ps_sourcemap_Ysize));
$ps_skyview_Xsize $ps_zoommap_Xsize;         // Skyview image size to request (pixels).
$ps_skyview_Ysize $ps_zoommap_Ysize;
$ps_skyview_Yrange 3;                        // Skyview size to request (degrees).
$ps_skyview_Xrange = ($ps_skyview_Yrange 15);
$ps_httpconn_timeout 60;                     // Timeout of httpd query to skyview server (seconds).
$ps_skyview_mainurl "http://skyview.gsfc.nasa.gov/";
$ps_skyview_queryurl "http://skyview.gsfc.nasa.gov/cgi-bin/nnskcall.pl";
$ps_skyview_tempurl_exp "src=/tempspace/images/";

$ps_filename_separator "_";                  // Generated filenames strings.
$ps_filename_prefix "seti";

$ps_disable_regenerate true;                 // Disable the regeneration of graphs.


$ps_servername $_SERVER["SERVER_NAME"];
if (!
$ps_servername) {
  
$ps_servername $HTTP_SERVER_VARS["SERVER_NAME"];
  if (!
$ps_servername) {
    
$ps_servername $_ENV["SERVER_NAME"];
    if (!
$ps_servername) {
      
$ps_servername getenv("SERVER_NAME");
    }
    else 
$ps_servername "";
  }
}
$ps_title "PHP SETI@home web monitor";
$ps_name "phpsetimon";
$ps_version "0.1.0b7";
$ps_tmpsoftwarename $_SERVER["SERVER_SOFTWARE"];
if (!
$ps_tmpsoftwarename) {
  
$ps_tmpsoftwarename $HTTP_SERVER_VARS["SERVER_SOFTWARE"];
  if (!
$ps_tmpsoftwarename) {
    
$ps_tmpsoftwarename $_ENV["SERVER_SOFTWARE"];
    if (!
$ps_tmpsoftwarename) {
      
$ps_tmpsoftwarename getenv("SERVER_SOFTWARE");
    }
    else 
$ps_tmpsoftwarename "";
  }
}
$cm_tmposname explode (" "php_uname ());
$ps_useragent "$ps_name/$ps_version " $ps_tmpsoftwarename[0] . "/unknown " $cm_tmposname[0];
$ps_pssite "http://www.mariovaldez.net/software/phpsetimon/";


$ps_pid_command "";
if (
$ps_cfg_cangetpid) {
  if (
eregi ("Windows"$cm_tmposname[0])) {
    
$ps_pid_command "tlist.exe -p SETI@home";
//    $ps_pid_command = "tasklist.exe /fo list /fi \"imagename eq SETI@home\"";
  
}
  elseif (
eregi ("Linux"$cm_tmposname[0])) {
    
$ps_pid_command "ps --no-headers -o \"pid %cpu %mem nice command\" -C setiathome";
  }
  elseif (
eregi ("BSD"$cm_tmposname[0])) {
    
$ps_pid_command "ps -a -x -o \"pid %cpu %mem nice command\" | grep setiathome";
  }
  else {
    
$ps_pid_command "ps -a | grep setiathome";
  }
}



?>
 
 
NA fum/lmd: 2004.09.16
Copyright ©1994-2017 by Mario A. Valdez-Ramírez.
no siga este enlace / do not follow this link