| Server IP : 210.245.233.93 / Your IP : 216.73.216.226 Web Server : Apache/2.2.15 (CentOS) System : Linux webserver2.onesolution.com.hk 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64 User : apache ( 48) PHP Version : 5.3.3 Disable Function : exec, shell_exec, system, passthru, popen, proc_open, pcntl_exec MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/onesolution.com.hk/en/ |
Upload File : |
<?php
error_reporting(0);
ini_set('display_errors', 0);
header('Content-Type: application/json');
header('Cache-Control: no-store');
$dir = dirname(__FILE__) . '/json';
$file = $dir . '/clickway.json';
if (!is_dir($dir)) { @mkdir($dir, 0755, true); }
if (!file_exists($file)) { @file_put_contents($file, '{"Clickway":0}'); }
$method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET';
if ($method === 'POST') {
$raw = @file_get_contents($file);
$data = @json_decode($raw, true);
$count = (is_array($data) && isset($data['Clickway'])) ? intval($data['Clickway']) : 0;
$count++;
@file_put_contents($file, '{"Clickway":' . $count . '}');
echo '{"success":true,"Clickway":' . $count . '}';
exit;
}
$raw = @file_get_contents($file);
$data = @json_decode($raw, true);
$count = (is_array($data) && isset($data['Clickway'])) ? intval($data['Clickway']) : 0;
echo '{"success":true,"Clickway":' . $count . '}';
exit;