Code for sending ADIF files to clublog
这个提交包含在:
父节点
cb8bdfc539
当前提交
0a065e28c2
共有 2 个文件被更改,包括 2933 次插入 和 2 次删除
|
|
@ -45,6 +45,12 @@ class Clublog extends CI_Controller {
|
||||||
// initialise the curl request
|
// initialise the curl request
|
||||||
$request = curl_init('https://clublog.org/putlogs.php');
|
$request = curl_init('https://clublog.org/putlogs.php');
|
||||||
|
|
||||||
|
if (function_exists('curl_file_create')) { // php 5.5+
|
||||||
|
$cFile = curl_file_create($_SERVER['DOCUMENT_ROOT']."/".$file_info['server_path']);
|
||||||
|
} else { //
|
||||||
|
$cFile = '@' . realpath($_SERVER['DOCUMENT_ROOT']."/".$file_info['server_path']);
|
||||||
|
}
|
||||||
|
|
||||||
// send a file
|
// send a file
|
||||||
curl_setopt($request, CURLOPT_POST, true);
|
curl_setopt($request, CURLOPT_POST, true);
|
||||||
curl_setopt(
|
curl_setopt(
|
||||||
|
|
@ -54,8 +60,8 @@ class Clublog extends CI_Controller {
|
||||||
'email' => $clublog_info['user_clublog_name'],
|
'email' => $clublog_info['user_clublog_name'],
|
||||||
'password' => $clublog_info['user_clublog_password'],
|
'password' => $clublog_info['user_clublog_password'],
|
||||||
'callsign' => $clublog_info['user_clublog_callsign'],
|
'callsign' => $clublog_info['user_clublog_callsign'],
|
||||||
'api' => "",
|
'api' => "a11c3235cd74b88212ce726857056939d52372bd",
|
||||||
'file' => '@' . $file_info['server_path']
|
'file' => $cFile
|
||||||
));
|
));
|
||||||
|
|
||||||
// output the response
|
// output the response
|
||||||
|
|
|
||||||
2925
uploads/clublog.ADIF
普通文件
2925
uploads/clublog.ADIF
普通文件
文件差异内容过多而无法显示
加载差异
正在加载…
在新工单中引用