As well as the main upload forms within the Club Log web site, there is another way to upload files directly which is designed to help developers wishing to add "Export to Club Log" features, or contesters and expeditioners who would like to have live logging updates to Club Log.
You can use HTTP POST to send ADIF files to https://clublog.org/putlogs.php. The POST form variables are as follows:
- email: A registered email address in Club Log
- password: The password to authenticate the email login (ideally, please ask the user to provide an Application Password from Club Log)
- callsign: Optionally, the callsign into which the logs should be uploaded. If not set, the primary callsign of the account is used.
- clear: If a value of 1 is given, the log will be flushed before the new upload is processed. In all other cases, including if this field is absent, the log will be merged.
- file: A multipart/form-data upload which is used to POST the ADIF file with the form. The filename should be an ADIF, LGS or a ZIP file containing one of those.
- api: An API key to access this interface (protecting it from abuse), which you can obtain by emailing the helpdesk.
For a working example, please view the source for https://clublog.org/test_upload.html.
Successful uploads receive an HTTP response code 200, but you should also allow for error 403 codes, eg. if the credentials are wrong or the log has already been uploaded.
Example using cURL
#!/bin/bash API='your-api-key-here' PASS=your-app-password-here' CALL='your-callsign-here' FILE='/Users/michael/Desktop/example.adi' EMAILfirstname.lastname@example.org' curl -v -H "Content-Type: application/x-www-form-urlencoded" --data-urlencode adif@$FILE -d email=$EMAIL -d callsign=$CALL -d password=$PASS -d api=$API https://clublog.org/realtime.php
Note: as with all Curl commands you must escape content correctly, e.g. consider URL encoding. See https://everything.curl.dev/http/post/url-encode.
IMPORTANT: Please don't ever use putlogs.php to try and achieve "real-time" uploads, with just a handful of QSOs in each ADIF. There is a real time API designed for this purpose. Putlogs.php will block excessive uploads of small files misuse of this feature causes congestion for other, normal ADIF uploads. Additionally, repeated use of putlogs.php automatically delays uploads as a disincentive, and can even result in your IP address being firewalled. Thanks for your understanding: you should be using realtime.php if you are logging in realtime!