mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
git-svn-id: http://www.observium.org/svn/observer/trunk@3240 61d68cd4-352d-0410-923a-c4978735b2b8
27 lines
414 B
PHP
Executable File
27 lines
414 B
PHP
Executable File
#!/usr/bin/env php
|
|
<?php
|
|
|
|
include("config.php");
|
|
include("includes/functions.php");
|
|
|
|
if ($fd = @fopen($argv[1],'r'))
|
|
{
|
|
$data = fread($fd,4096);
|
|
while (!feof($fd))
|
|
{
|
|
$data .= fread($fd,4096);
|
|
}
|
|
|
|
foreach (explode("\n", $data) as $line)
|
|
{
|
|
$update = mysql_query($line);
|
|
// FIXME check query success?
|
|
echo("$line \n");
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo("ERROR: Could not open file \"$argv[1]\".\n");
|
|
}
|
|
|
|
?>
|