Chicano
08-30-2002, 05:41 AM
Ok, this is basically what I want to accomplish, and please realize, that I don't know how to write it PHP btw...
I have an FTP Server, (Bullet Proof FTP server) and with it, you can, apon a certain event (such as, every hour, or every time a user connects, or every time a user creates a folder, etc etc etc) you can make something happen (like run a program for instance)
Now, I also have an HTTP server, using firepages' awesome PHPDev. I wanted to, apon say, a user connecting, be able to edit a text file maybe by adding 1 to whatever number is in the textfile. (so if the text file says 2, then it would be 3 by the time it ends editing it.. or if it is 0, then it would become 1) maybe this textfile could be located inside the folder of my HTTP server, and then with say SSI I could include that textfile into my page, and it could be the number of people connected to my FTP server at the time. (I would also have to be able to reduce the number in the text file by one whenever someone disconnects)
Now, since the only really helpful thing I can do on the event of say a user conecting, is to run a program (with parameters of course), then I say that I might be able to run a batch file maybe? which would possibly edit the file?
Or, if that is not possible, to edit a file and add or subtract 1 to the number inside, then I was thinking... maybe it could simply CREATE a text file inside the folder, and then a the webpage where it is included, say a php page, could count the number of "files" inside a folder (where the batch file creates the file) and, depending on the number inside the folder, it gives you the amount? so then, all the batch file would have to do, is create a file (if it can't create, well, I know it CAN copy a file.. so I could have a file and it would copy it into the folder where the php counts how many files exist) or delete a file, while the php script inside the page detects how many files exist in the folder.
Any help on how to do any of this would be GREATLY appreciated... with this learned, I could maybe be able to also have it so it can detect when the server is online or offline (those are events you can say to run a program as well in the BPFtp server) and many more things.
Thanks a lot for any input or help, and I hope this dosnt sound TOO confusing :confused:
-Ian
I have an FTP Server, (Bullet Proof FTP server) and with it, you can, apon a certain event (such as, every hour, or every time a user connects, or every time a user creates a folder, etc etc etc) you can make something happen (like run a program for instance)
Now, I also have an HTTP server, using firepages' awesome PHPDev. I wanted to, apon say, a user connecting, be able to edit a text file maybe by adding 1 to whatever number is in the textfile. (so if the text file says 2, then it would be 3 by the time it ends editing it.. or if it is 0, then it would become 1) maybe this textfile could be located inside the folder of my HTTP server, and then with say SSI I could include that textfile into my page, and it could be the number of people connected to my FTP server at the time. (I would also have to be able to reduce the number in the text file by one whenever someone disconnects)
Now, since the only really helpful thing I can do on the event of say a user conecting, is to run a program (with parameters of course), then I say that I might be able to run a batch file maybe? which would possibly edit the file?
Or, if that is not possible, to edit a file and add or subtract 1 to the number inside, then I was thinking... maybe it could simply CREATE a text file inside the folder, and then a the webpage where it is included, say a php page, could count the number of "files" inside a folder (where the batch file creates the file) and, depending on the number inside the folder, it gives you the amount? so then, all the batch file would have to do, is create a file (if it can't create, well, I know it CAN copy a file.. so I could have a file and it would copy it into the folder where the php counts how many files exist) or delete a file, while the php script inside the page detects how many files exist in the folder.
Any help on how to do any of this would be GREATLY appreciated... with this learned, I could maybe be able to also have it so it can detect when the server is online or offline (those are events you can say to run a program as well in the BPFtp server) and many more things.
Thanks a lot for any input or help, and I hope this dosnt sound TOO confusing :confused:
-Ian