2

!rant
Starting my first small c++ project with website interaction on an Ubuntu server as practice for next semester. Any good recommendations to get user input from a webpage using only c++ (there can be html within the c++ program of course) and libraries?

I have once worked with an httpd-deamon and got user info from the url but I want a user to be able to fill in 2 textboxes and submit them using a button.
Plain text is good enough and it will only be used by 2 people once every week or so.

Comments
  • 0
    Just read the post stuff from the request header? Or am I wrong? πŸ€” you want to write your own http server in c++, right?
  • 0
    @b3b3 I think so. Not entirely sure.
    I'm still new to C++ and webservers. I am using Apache and I have some example from a school assignment but it looked like they made the http formatting with C++. Which then runs on Apache.
  • 0
    I once wrote an http server in c++ with boost::asio and it was just waiting for a request to come in, then read the requested site (like /index.html or whatever) and the post/get data from the header data, then reading the index.html from the file, eventually replace variable placeholders or whatever, and just send back the result. Not sure if I can help you with thatπŸ€”πŸ˜‹
  • 0
    @b3b3 I'll look into that. It sounds straight forward the way you explain it. Thanks 😊
    If I run into trouble I might chat you up if that's okay.
  • 0
    I'm sure that what I did was the worst thing you could do but it was pretty fun :)
  • 0
    @b3b3 it's just for personal use so I don't really mind of it's not the most elegant solution.
    As long as the data is received in my program it's all good. πŸ‘Œ
  • 0
    https://youtu.be/3Xqk6iEHGkE this might be interesting for you. Its in German but the basic idea should be self explaining
  • 1
    @b3b3 cool thanks. There are worse languages πŸ˜‹.
Add Comment