"; echo "Forum system version:".$modSettings['smfVersion']."
"; echo "Current Tapatalk plugin version: ".$current_plugin_version."
"; echo "Latest Tapatalk plugin version: ".$latest_tp_plugin_version."
"; echo "Attachment upload interface status: ".($check_upload_status ? 'OK' : 'Inaccessible')."
"; echo "Push notification interface status: ".($check_push_status ? 'OK' : 'Inaccessible')."
"; echo "
Tapatalk API for Universal Forum Access | Build Your Own
For more details, please visit http://tapatalk.com"; } function get_latest_plugin_version() { $tp_lst_pgurl = 'http://tapatalk.com/v.php?sys=sm-2a&link'; $response = 'CURL is disabled and PHP option "allow_url_fopen" is OFF. You can enable CURL or turn on "allow_url_fopen" in php.ini to fix this problem.'; if (function_exists('curl_init')) { $ch = curl_init($tp_lst_pgurl); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch,CURLOPT_TIMEOUT,10); $response = curl_exec($ch); curl_close($ch); } elseif (ini_get('allow_url_fopen')) { $params = array('http' => array( 'method' => 'POST', 'content' => http_build_query($data, '', '&'), )); $ctx = stream_context_create($params); $timeout = 10; $old = ini_set('default_socket_timeout', $timeout); $fp = @fopen($tp_lst_pgurl, 'rb', false, $ctx); if (!$fp) return false; ini_set('default_socket_timeout', $old); stream_set_timeout($fp, $timeout); stream_set_blocking($fp, 0); $response = @stream_get_contents($fp); } return $response; } function get_path() { $path = '../'; if (!empty($_SERVER['SCRIPT_NAME']) && !empty($_SERVER['HTTP_HOST'])) { $path = $_SERVER['HTTP_HOST']; $path .= dirname($_SERVER['SCRIPT_NAME']); } return $path; } if (!function_exists('http_build_query')) { function http_build_query($data, $prefix = null, $sep = '', $key = '') { $ret = array(); foreach ((array )$data as $k => $v) { $k = urlencode($k); if (is_int($k) && $prefix != null) { $k = $prefix . $k; } if (!empty($key)) { $k = $key . "[" . $k . "]"; } if (is_array($v) || is_object($v)) { array_push($ret, http_build_query($v, "", $sep, $k)); } else { array_push($ret, $k . "=" . urlencode($v)); } } if (empty($sep)) { $sep = ini_get("arg_separator.output"); } return implode($sep, $ret); } }