Need a little program.

Post your requests and suggestions for features, add-ons, etc here.

Moderator: Mod Squad

Post Reply
User avatar
ccs
Posts: 193
Joined: Mon Apr 03, 2006 7:55 pm
Location: Cape Cod Ma
Contact:

Need a little program.

Post by ccs »

I'm writeing this game that you play through the web. I use the bbs web server and its accounting system to control access to the game. I have a game program that runs on a day or so and prossess game orders that the players enter through the web pages.

What I need is a way to drop commands to a text file in a format I can use in the off line program. I would like to controll access to the sections of the website (update the access control file) from the web pages.

Any thoughts?

I would write the whole program in a bbs module but I'm not that good at c++.


Joe
++++++++++++++++++++
Retro BBS Games
Telnet://bbs.retrobbsgames.net
++++++++++++++++++++

User avatar
dspain
Posts: 2102
Joined: Sun May 07, 2006 10:38 pm
Location: richmond,virginia
Contact:

Re: Need a little program.

Post by dspain »

ccs wrote:I'm writeing this game that you play through the web. I use the bbs web server and its accounting system to control access to the game. I have a game program that runs on a day or so and prossess game orders that the players enter through the web pages.

What I need is a way to drop commands to a text file in a format I can use in the off line program. I would like to controll access to the sections of the website (update the access control file) from the web pages.

Any thoughts?

I would write the whole program in a bbs module but I'm not that good at c++.


Joe
you just want the game to create a text file?

FILE *myfile;
if((myfile=fopen("MYFILE.TXT",FOPAA))!=NULL)
{
fprint(myfile,"entry #1\n");
fprint(myfile,"entry #2\n");
fclose(myfile);
} else shocst("FILE ERROR","MYFILE.TXT CANNOT BE OPENED OR MODIFIED");


works to write variables too.

fprint(myfile,"Name: %s\n",uacoff(usrnum)->userid);

thats just to create/edit simple text files.

to deleted it just use unlink(myfile);
that would delete the file pending itsn ot in use.

hope it helps.

Daniel

User avatar
ccs
Posts: 193
Joined: Mon Apr 03, 2006 7:55 pm
Location: Cape Cod Ma
Contact:

Re: Need a little program.

Post by ccs »

dspain wrote:
ccs wrote:I'm writeing this game that you play through the web. I use the bbs web server and its accounting system to control access to the game. I have a game program that runs on a day or so and prossess game orders that the players enter through the web pages.

What I need is a way to drop commands to a text file in a format I can use in the off line program. I would like to controll access to the sections of the website (update the access control file) from the web pages.

Any thoughts?

I would write the whole program in a bbs module but I'm not that good at c++.


Joe
you just want the game to create a text file?

FILE *myfile;
if((myfile=fopen("MYFILE.TXT",FOPAA))!=NULL)
{
fprint(myfile,"entry #1\n");
fprint(myfile,"entry #2\n");
fclose(myfile);
} else shocst("FILE ERROR","MYFILE.TXT CANNOT BE OPENED OR MODIFIED");


works to write variables too.

fprint(myfile,"Name: %s\n",uacoff(usrnum)->userid);

thats just to create/edit simple text files.

to deleted it just use unlink(myfile);
that would delete the file pending itsn ot in use.

hope it helps.

Daniel
I guss what I'm looking for is a mod to the web server thats built in to wg that will let me do all this. I can use php or perl but I want to use wg and its key and class accounting system.

Joe
++++++++++++++++++++
Retro BBS Games
Telnet://bbs.retrobbsgames.net
++++++++++++++++++++

User avatar
dspain
Posts: 2102
Joined: Sun May 07, 2006 10:38 pm
Location: richmond,virginia
Contact:

Re: Need a little program.

Post by dspain »

ccs wrote:
dspain wrote:
ccs wrote:I'm writeing this game that you play through the web. I use the bbs web server and its accounting system to control access to the game. I have a game program that runs on a day or so and prossess game orders that the players enter through the web pages.

What I need is a way to drop commands to a text file in a format I can use in the off line program. I would like to controll access to the sections of the website (update the access control file) from the web pages.

Any thoughts?

I would write the whole program in a bbs module but I'm not that good at c++.


Joe
you just want the game to create a text file?

FILE *myfile;
if((myfile=fopen("MYFILE.TXT",FOPAA))!=NULL)
{
fprint(myfile,"entry #1\n");
fprint(myfile,"entry #2\n");
fclose(myfile);
} else shocst("FILE ERROR","MYFILE.TXT CANNOT BE OPENED OR MODIFIED");


works to write variables too.

fprint(myfile,"Name: %s\n",uacoff(usrnum)->userid);

thats just to create/edit simple text files.

to deleted it just use unlink(myfile);
that would delete the file pending itsn ot in use.

hope it helps.

Daniel
I guss what I'm looking for is a mod to the web server thats built in to wg that will let me do all this. I can use php or perl but I want to use wg and its key and class accounting system.

Joe
ok shoot me a private message that explains more on exactly what it is you're wanting to output to this file and how you want it read back.

Post Reply