Here is a simple code to make an HTTP call with the CURL library.
The call is also passing 2 parameters and the line will looks like:

This is also requires the installation of the curl library. Download the latest version from HERE. The home page of CURL is HERE.
Unzip it in a folder then:

sudo ./configure
sudo make
sudo make install

Here is the c++ code in a function:

#include  <string.h>
#include <curl/curl.h>

using namespace std;

void send_log_http(string sparam1, string sparam2)
  CURL *curl_main;
  CURLcode res;
  string sparams=»»;

  curl_main = curl_easy_init();
    curl_easy_setopt(curl_main, CURLOPT_URL, «»);

    curl_easy_setopt(curl_main, CURLOPT_POSTFIELDS, sparams.c_str());
    curl_easy_setopt(curl_main, CURLOPT_WRITEFUNCTION, NULL);

    res = curl_easy_perform(curl_main);
    if (res != CURLE_OK)
      char buf[250];
      sprintf(buf, «[curl_main]-%s», curl_easy_strerror(res));
    char buf[250];
    sprintf(buf, «Error creating curl_main.»);


The web_server.php must start like that:


if (isset($_REQUEST[‘param1’]) && isset($_REQUEST[‘param2’]))
  $param1 = $_REQUEST[‘param1’];
  $param2 = $_REQUEST[‘param2’];