Page 1 of 1

Need a little program.

Posted: Wed Nov 22, 2006 1:19 am
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

Re: Need a little program.

Posted: Wed Nov 22, 2006 9:36 am
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

Re: Need a little program.

Posted: Wed Nov 22, 2006 10:44 am
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

Re: Need a little program.

Posted: Wed Nov 22, 2006 11:13 am
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.