Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3697384
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:51:12+00:00 2026-05-19T04:51:12+00:00

I have a wxWidgets application and would like to add a way for users

  • 0

I have a wxWidgets application and would like to add a way for users to submit feedback in a simple (implementation and usage), reliable, cross-platform and secure way. Using HTTP POST over SSL seems to fit those requirements best (although I’ll consider answers that suggest other approaches). However, support for HTTPS in wxWidgets seems limited.

Here are some of the options I’ve considered and the problems with them:

  • wxSMTP: no SSL/TLS support that I’ve found. Relies on user having a correct mail configuration (sendmail, MAPI).
  • wxHTTP: everything but SSL/HTTPS support.
  • wxSSL: everything if it wasn’t incomplete and long dead.
  • wxCURL: everything but complicated to build/incorporate (in fact currently release fails to build).
  • libcurl: just link with and call into libcurl directly. This is the solution I’ve settled on (and I have a working prototype) but it feels very non-wx and while libcurl is cross-platform, Windows is definitely not its native platform so it adds significant dependency and build complexity to the project.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T04:51:13+00:00Added an answer on May 19, 2026 at 4:51 am

    I’ve decided to go with libCURL linked to openssl. Both of the packages are able availabe on most Linux system and can be fairly easily built on Windows and OS X.

    Here is example C code that sends feedback:

    #include <stdio.h>
    #include <string.h>
    
    #include <curl/curl.h>
    #include <curl/types.h>
    #include <curl/easy.h>
    
    int main(int argc, char *argv[])
    {
      CURL *curl;
      CURLcode res;
    
      struct curl_httppost *formpost=NULL;
      struct curl_httppost *lastptr=NULL;
      struct curl_slist *headerlist=NULL;
      static const char buf[] = "Expect:";
    
      curl_global_init(CURL_GLOBAL_ALL);
    
      /* Fill in the name field */
      curl_formadd(&formpost,
                   &lastptr,
                   CURLFORM_COPYNAME, "name",
                   CURLFORM_COPYCONTENTS, "John Doe",
                   CURLFORM_END);
    
      /* Fill in the comments field */
      curl_formadd(&formpost,
                   &lastptr,
                   CURLFORM_COPYNAME, "comments",
                   CURLFORM_COPYCONTENTS, "using HTTPS POST\nline 2\nline 3",
                   CURLFORM_END);
    
      curl = curl_easy_init();
      /* initalize custom header list (stating that Expect: 100-continue is not
         wanted */
      headerlist = curl_slist_append(headerlist, buf);
      if(curl) {
        /* what URL that receives this POST */
        curl_easy_setopt(curl, CURLOPT_URL, 
            "https://some_host.com/path/feedback.php");
    
        // Uncomment to disable certificate checks
        //curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
        //curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
    
        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
        curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost);
        res = curl_easy_perform(curl);
    
        printf("Curl result: %d\n", res);
    
        /* always cleanup */
        curl_easy_cleanup(curl);
    
        /* then cleanup the formpost chain */
        curl_formfree(formpost);
        /* free slist */
        curl_slist_free_all (headerlist);
      }
      return 0;
    }
    

    That can be compiled on Linux like so:

    gcc post.c -lcurl -o post
    

    Here is example PHP code that accepts that post:

    <?php
        $recipient = "john@some_host.com";
        if (empty($_POST)) {
            // We only accpet POSTs
            header('HTTP/1.0 403 Forbidden');
            exit;
        } else {
            // Handle a POST
            $message .= "Submitted at ".date("F j, Y, g:i a")."\n\n";
            $message .= "Name:\n";
            $message .= $_POST['name']."\n\n";
            $message .= "-------------------------------------------\n\n";
            $message .= "Comments:\n\n";
            $message .= $_POST['comments']."\n\n";
            // Send message to email address
            $sent = mail($recipient, "Feedback", 
                $message, "From: Feedback <noreply@some_host.com>\r\n");
    
            if ($sent) {
    ?>
                <html>
                <body>
                    Got POST and sent email:
                    <pre><? echo $message; ?></pre>
                </body>
                </html>
    <?php
            } else {
                // Return an error
                header('HTTP/1.0 500 Internal Server Error', true, 500);
                exit;
            }
        }
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a C++ desktop application (written in wxWidgets) and I want to add
Background: I have an application written in native C++ which uses the wxWidgets toolkit's
I have a DrawingArea which I would like to received mouse events. From the
I am writing a fat client application that I would ideally like to be
I have source in a bunch of subdirectories like: src/widgets/apple.cpp src/widgets/knob.cpp src/tests/blend.cpp src/ui/flash.cpp In
If I have a notebook with three spreadsheet widgets, what is the best way
I need to add the ability for users of my software to select records
I have an application which I am developing using WPF\Prism\MVVM. All is going well
I hope this makes sense. I have a ASP.NET web application that uses Entity
I have a Ruby on Rails application that has two active environments, Stage and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.