private function sendAppData($params)
{
$config_file = $this->config_path . '/database.yml';
$db_config = Yaml::parse(file_get_contents($config_file));
$this->setPDO();
$stmt = $this->PDO->query('select version() as v');
$version = '';
foreach ($stmt as $row) {
$version = $row['v'];
}
if ($db_config['database']['driver'] === 'pdo_mysql') {
$db_ver = 'MySQL:' . $version;
} else {
$db_ver = $version;
}
$data = http_build_query(array('site_url' => $params['http_url'], 'shop_name' => $params['shop_name'], 'cube_ver' => Constant::VERSION, 'php_ver' => phpversion(), 'db_ver' => $db_ver, 'os_type' => php_uname()));
$header = array('Content-Type: application/x-www-form-urlencoded', 'Content-Length: ' . strlen($data));
$context = stream_context_create(array('http' => array('method' => 'POST', 'header' => $header, 'content' => $data)));
file_get_contents('http://www.ec-cube.net/mall/use_site.php', false, $context);
return $this;
}