Log in

View Full Version : Simplest way to do automatic registrations


Frank
07-03-2004, 04:04 PM
I am looking for the absolute simplest way to let my program contact my website, submit a string of characters to it, let the website store it, calculate something from that string, and send something back to my program.

First I thought I needed a dedicated Windows-based server with a webservice (as an EXE, since I can make those..), but since then I found out about CGI scripts, PERL, all kinds of server-side scripting (ASP) etc.

Now, for a newbie, what is a simple solution? The database should not be visible to the outside world but the communication can be unencrypted.

My current host does not let me run EXE's, and I am also interested in the cheapest (Windows-based) host that allows running EXE's, a kind of "dedicated server light".

But the best would be some kind of ready-made template that works with standard stuff - which I am all unfamiliar with -

:confused:

PoV
07-03-2004, 04:52 PM
I've not tried this myself, so anyone feel free to correct me or suggest something better. Something I've considered was using a hidden PHP (or perl) form on my website, and use libCURL (http://curl.haxx.se/) to send my request and get my response.

Lizardsoft
07-03-2004, 07:39 PM
You don't need an .exe at all, and that's probably the most difficult way to do it. Most hosts support PHP and using POST or even GET you can easily send the data to the script on the server.

Server side things are dead easy. Here's a quick not syntax-checked PHP scripts that reads some variables sent to a script and mails them to you:


<?

$Result = '';

foreach( $_POST as $key => $value )
$Result .= "$key : $value \n";

mail( 'my@email.com', 'POST Submission', $Result );
?>


Note: if you plan on using this, read up on PHP first. I posted this as a quick sample, there's some security issues with using the code above.

Matthijs Hollemans
07-04-2004, 12:50 AM
The simplest way to do it is to send your payment processing service a list of pre-made license codes. Then when someone orders, they pick the next code of the list and send that to the customer. Most payment processors provide this kind of option. Of course, this doesn't allow you to embed the customer's name in the code.

Frank
07-04-2004, 02:18 AM
Thanks for the suggestions.
I guess I will read up on PHP.

The reason I can't have a simple "pre-defined" serial scheme is that I have chosen for a rather controversial protection scheme: 3 months free use but within those 3 months a hardware-based licence key is needed.

The way it works: The application calculates a unique string based on its CRC (unique bec. every build has auto-increment version). That is the serial on the CD. (application barely fits on a CD and is only for sale on CD, mainly in China, Japan and Korea - the reason why I want strong copy protection).

The game ("Go/Weichi/Baduk") does then what MS does with product activation: It looks at the hardware and as long as not too many components have changed simultaneously, it will not need a new licence key.

That key is based on the CRC string plus the hardware string.

This is all up & running, tested & working fine, the only thing needed is automatic registration.

email-based would be interesting as well. An application, using POP3, "listening" to an email address. That way I can use any language to build the actual licencing application and there would be higher security. The only thing needed would be email forwarding and a PC that is always on the internet.

The advantage of the latter is that you can build in redundancy, simply have this application auto-run on a few PC's of friends and you'll never have any down-time.

Does this all sound over the top or impractical? The reason I am a bit paranoid is that the price of this game/analysis tool is quite a bit higher than the average Shareware game and I will have been working full-time on it for 3 years when it's done..

erikh2000
07-07-2004, 09:36 AM
I've not tried this myself, so anyone feel free to correct me or suggest something better. Something I've considered was using a hidden PHP (or perl) form on my website, and use libCURL (http://curl.haxx.se/) to send my request and get my response.
libCURL/PHP works great. Without using the lib before, a programmer on my team had the game grabbing files and XML data from a web server in a few days. It's easy to use form posts to make requests, and the data returned from the PHP page can be anything.

-Erik