So I've got this piece of software that is written in C++. I also have a website hosted on hostgator with linux server i believe. I have a MySQL database with usernames and passwords.

What I want to happen is for my client application that is written in C++ to connect to my hostgator space where some sort of handling device will check the login/pass transmitted from the client application to make sure they have a membership and can be using the software.

I'm working with a web developer on this. I'm handing all the PC client software coding, and he is making our website for us. Neither of us really know each others territory too horribly well, and we've both made suggestions on how to best do this. They all sound like crappy work arounds though.

Does anyone have any suggestions on the best method to do this? In the end all the client software needs to do is send a login/pass to the server, and basically recieve a true/false back that the person has a membership as specified in our database.

Recommended Answers

All 2 Replies

Sounds pretty easy actually. Have him write a CGI or PHP page, that queries the server-side database. It uses POST to accept the username and password fields. Then, you write the C++ application using sockets (sdl_net, save yourself the major headache) to connect to the web server, and simply send it the HTTP header with the required data (username and password). When you send the data to the webserver, his CGI/PHP will run, query the database, and return a web page that is basically just a 1 or 0. You parse the HTTP header, and find the 1 or 0.... then you know.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.