$GLOBALS["VERBOSE"] = true; //$GLOBALS["DEBUG_MEM"]=true; ini_set('display_errors', 1); ini_set('html_errors', 0); ini_set('display_errors', 1); ini_set('error_reporting', E_ALL); $GLOBALS["FORCE"] = true; } if ($argv[1] == '--free') { FreeSync(); } if ($argv[1] == '--freemem') { FreeMem(); } if ($argv[1] == '--watchdog') { Watch(); } include_once dirname(__FILE__) . '/framework/class.unix.inc'; if (!Build_pid_func(__FILE__, "MAIN")) { writelogs(basename(__FILE__) . ":Already executed.. aborting the process", basename(__FILE__), __FILE__, __LINE__); die; } include_once dirname(__FILE__) . "/ressources/class.os.system.tools.inc"; $os = new os_system(); $mem = $os->memory(); $swap_percent = $mem["swap"]["percent"]; $swap_used = $mem["swap"]["used"]; $ram_free = $mem["ram"]["free"]; $ram_total = $mem["ram"]["total"]; $operation_disponible = $ram_free - $swap_used; $max = str_replace(" ", " ", FormatBytes(round($ram_total / 2)));
if (NULL === $web_content) return NULL; $mysql = new SaeMysql(); // store web content(plain text) $sql = "INSERT INTO `web_content` ( `url` , `date` , `content` ) VALUES ( '" . $mysql->escape($url) . "' , '" . $date . "' , '" . $web_content . "')"; if (!$mysql->runSql( $sql )) echo "Error : " . $sql; else echo "Sql is executed successfully."; $mysql->closeDb(); return $web_content; } if(!empty($_GET)) { if (isset($_GET["target"])) { $target = $_GET["target"]; $content = Watch($target); echo $target; echo $content; } } ?> </body> </html>