<?php
require_once 'inc/core.php'; //ядро
$sql = "CREATE TABLE IF NOT EXISTS `palevo` (
`id` int(10) NOT NULL auto_increment,
`ip` varchar(16) NOT NULL,
`agent` varchar(100) NOT NULL,
`brovser` varchar(30) NOT NULL,
`os` varchar(20) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=25;";
$sql2 = "INSERT INTO `palevo` (`id`, `ip`, `agent`, `brovser`, `os`) VALUES
(13, '12.23.345.2', 'Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13', 'Mozilla', 'Windows'),
(14, '83.88.201.123', 'Opera/9.80 (Windows NT 6.1; U; ru) Presto/2.7.62 Version/11.00', 'Opera', 'Windows'),
(15, '12.212.112.12', 'Opera/9.60 (J2ME/MIDP; Opera Mini/4.2.14320/504; U; ru) Presto/2.2.0', 'Opera', 'J2ME'),
(16, '1.34.32.45', 'Opera/9.60 (J2ME/MIDP; Opera Mini/4.0.9751/504; U; ru) Presto/2.2.0', 'Opera Mini', 'J2ME'),
(17, '111.23.22.98', 'SEC-SGHE570/1.0 NetFront/3.2 Profile/MIDP-2.0 Configuration/CLDC-1.1', '', ''),
(18, '98.23.122.212', 'PG-3500/R01 Profile/MIDP-2.0 Configuration/CLDC-1.1', '', ''),
(19, '112.2.32.12', 'Opera/9.60 (J2ME/MIDP; Opera Mini/4.2.14881/504; U; uk) Presto/2.2.0', 'Opera Mini', 'J2ME'),
(20, '98.23.23.23', 'Mozilla/4.0 (compatible; MSIE 6.0; Symbian OS; Nokia N70/5.0638.3.0.1; 9399) Opera 8.65 [ru]', 'Mozilla', 'Symbian'),
(21, '212.4.2.31', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.2.13) Gecko/20101203 MRA 5.7 (build 03797) Firef', 'Mozilla', 'Windows'),
(22, '123.23.34.212', 'SAMSUNG-SGH-E380/1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 UP.Browser/6.2.3.3.c.1.101 (GUI) MMP/2.', '', 'J2ME'),
(23, '12.233.34.12', 'Opera/9.80 (J2ME/MIDP; Opera Mini/4.2.13337/938; U; ru) Presto/2.2.0', 'Opera', 'J2ME'),
(24, '212.23.23.19', 'UCWEB7.0.0.33/27/999', 'UCWEB', '');";
mysql_query($sql);
mysql_query($sql2);
$query = mysql_query("SELECT * FROM `host` WHERE `refid` = '204';");
while ($palevoData = mysql_fetch_array($query))
{
mysql_query("INSERT INTO `palevo` SET
`ip` = '$palevoData[ip]',
`agent` = '$palevoData[agent]',
`brovser` = '$palevoData[brovser]',
`os` = '$palevoData[os]'");
}
?>