Valhalla Legends Forums Archive | General Programming | Stats to web..

AuthorMessageTime
pileofcrap
hey is there a way I can show the stats of members of my gaming clan (clan (I) ) ... kind of how you have it where you can see all the members in your channel and what they are saying.

but i want to be able to do that with stats.. so that when they get a new win or lose itll auto update.
March 1, 2003, 12:11 AM
iago
You would have to run a bot that would constantly do stat lookups, and it would automatically update your website if it found a change.
March 1, 2003, 1:35 AM
pileofcrap
how would I set my webpage to read from the bot and post it to my site? What web language would be needed?
March 1, 2003, 1:25 PM
Yoni
You can ask Skywing, Spht (or me) for a Webchannel account if you want one.
If your question is about designing it yourself; Skywing's Webchannel uses a custom ISAPI DLL, and a little bit of ASP.
March 1, 2003, 8:50 PM
haZe
[quote]You would have to run a bot that would constantly do stat lookups, and it would automatically update your website if it found a change.[/quote]
Simplified: you would run a bot that flooded off a lot :P (not nessicarily, but u get the point :p)
March 2, 2003, 8:40 AM
Atom
I would just learn a little bit of Php, cuz thats prolly what your site supports. Have your bot send the stats to your Php Script, and the Php script save it as a text file... then an Html file access the text file with an include.
March 2, 2003, 12:05 PM
Spht
[quote]
Simplified: you would run a bot that flooded off a lot :P (not nessicarily, but u get the point :p)
[/quote]

Flood off a lot? Not if you were smart and did binary stat look-ups instead of using standard slash commands.
March 2, 2003, 1:15 PM
iago
[quote]how would I set my webpage to read from the bot and post it to my site? What web language would be needed?[/quote]

If you want to do it the easy way, make a chatbot (not binary), and have the chatbot do stats lookups, checking them vs. a local database (ie, a list of stats on your computer).  If it finds a change, generate a new html file (or edit the old one), connect to your ftp server, and send the file, or find a commandline ftp program that you can run using the shell() command.  

That would be the easiest way, in my opinion.

You could also use that same method for listing who in your clan is online, and stuff like that :)
March 2, 2003, 3:01 PM
pileofcrap
Hmm .... well it wouldnt flood at all. It would only need to check like every half our, every hour? lol ...

anyway, yeah that does seem to be the best way. Have a bot send it back to a file (either php or asp) but, my webserver that I run off of isnt like my connection or anything, i rent space from FLOHOST.

Could I get it to automaticly update it from there, or would I have to turn my connection into a small web server?






also, that webchannel shit is really badass. lol Im wanting what I need to do similar to that but just check and update stats.
March 4, 2003, 3:05 AM
iago
Well, unless your webserver lets you run a process (I greatly doubt it), you will have to update it from your computer.  Like I said earlier, you can do one of two things:
1. Have it generate an html file and upload by the use of a commandline ftp program:
[code]
if StatsChanged() then
 shell("c:\program files\clftp\ftp.exe -upload \"c:\BotUpdatePage.html\" -user \"iago\"") ..etc.  
[/code]
I don't know if that kind of ftp client actually exists, but I'm sure it does somewhere.

2. Have a script (php, perl, whatever) running on your webserver that could take updates like somebody filled out a form.  What you could do is write a simple html form, I would would suggest "<form method=get action=updatescript.cgi><input type=text name=username><input type=password name=password>...etc" then packetsniff to find out how the request is sent, then imitate that with a winsock control on your bot.
March 4, 2003, 12:02 PM
Skywing
[quote]Well, unless your webserver lets you run a process (I greatly doubt it), you will have to update it from your computer.  Like I said earlier, you can do one of two things:
1. Have it generate an html file and upload by the use of a commandline ftp program:
[code]
if StatsChanged() then
 shell("c:\program files\clftp\ftp.exe -upload \"c:\BotUpdatePage.html\" -user \"iago\"") ..etc.  
[/code]
I don't know if that kind of ftp client actually exists, but I'm sure it does somewhere.

2. Have a script (php, perl, whatever) running on your webserver that could take updates like somebody filled out a form.  What you could do is write a simple html form, I would would suggest "<form method=get action=updatescript.cgi><input type=text name=username><input type=password name=password>...etc" then packetsniff to find out how the request is sent, then imitate that with a winsock control on your bot.[/quote]
I believe ncFTP can do that kind of commandline scripting...
March 4, 2003, 1:52 PM
Etheran
ewww plzzzzz!! use an access database  :P
March 4, 2003, 4:37 PM
Grok
[quote]ewww plzzzzz!! use an access database  :P[/quote]

No way.  Install MSDE and use ADO or ODBC direct.  ODBC is uber fast and MSDE kicks Access' performance, features, and abilities around.

http://www.microsoft.com/sql/howtobuy/msdeuse.asp

March 4, 2003, 6:21 PM
iago
I was trying to make the solution as simple as possible :P
March 4, 2003, 7:16 PM
St0rm.iD
Why don't you just run a custom webserver from your box on some obscure port?
March 4, 2003, 8:38 PM
Atom
Plz dont say box, you sound like you hump linux cd's.

Now back to answering your question, you said you rent space from bla bla bla. If your host doesnt provide php, simply move hosts cuz thats really the standard and if they dont have that its pathetic on their part.
March 4, 2003, 10:43 PM
pileofcrap
uhhh why couldnt I just make a bot that would output all the stats onto one page (something.html) then setup up a webserver on my PC and just have a link going from my page to it??
March 5, 2003, 12:13 AM
iago
[quote]uhhh why couldnt I just make a bot that would output all the stats onto one page (something.html) then setup up a webserver on my PC and just have a link going from my page to it??[/quote]

Of course you can do that! But setting up a webserver isn't terribly easy, it'll eat up your bandwidth (yum!) and you'll have to leave your computer turned on for that.  Also, you will need a dynamic dns (like www.no-ip.com) unless you have a totally static ip.
March 5, 2003, 11:44 AM
pileofcrap
Lol, I have already taken all that into consideration. Ive setup small webservers on my PC before, just for small websites that I use to run;)..... also I have this OLD 486 (and it still runs, lol) that I could set it up on since thats all it would be doing.




OR BETTER YET!!!!
this may be either really hard or impossible, but couldnt I setup the bot so that when it has a new set of stats that it can logon to a designated ftp dir on my website and upload it from there?
March 5, 2003, 2:01 PM
iago
[quote]this may be either really hard or impossible, but couldnt I setup the bot so that when it has a new set of stats that it can logon to a designated ftp dir on my website and upload it from there?[/quote]

Yes, that's exactly what I said (MORE THAN ONCE).  Please, read what I say before replying :P
March 5, 2003, 2:20 PM
Skywing
[quote]uhhh why couldnt I just make a bot that would output all the stats onto one page (something.html) then setup up a webserver on my PC and just have a link going from my page to it??[/quote]
What if you're trying to upload it at the same time as a user is trying to view it?  Enjoy stuff breaking due to sharing violations.
March 6, 2003, 2:09 PM
pileofcrap@school
iago, i actually dont even remember you saying that at all.

Skywing, nah I mean it will output stats at regular intervals. (ex. 10 minutes)
March 6, 2003, 6:59 PM
pileofcrap@school
I would login but my college is weird about stuff like that, I think...

anyway...

iago, i seen it now. I went back to look. I think the way you were putting it is more complicated than it had to be. like saying how display it on the html. Lol =)

its cool tho, thanx for the advice all ;)
March 6, 2003, 7:02 PM
Skywing
[quote]iago, i actually dont even remember you saying that at all.

Skywing, nah I mean it will output stats at regular intervals. (ex. 10 minutes)[/quote]
And that changes the fact that you'll get sharing violations which will either block the upload or block people from browsing your site how...?

Consider the possibility that your site gets really popular.  If there are lots of visitors, you'll have a hard time writing to a file locked with read access by the webserver.
March 7, 2003, 2:04 PM
iago
Well, he can upload it with a different filename then rename it.  That would make the quickest transition.  Or, he can write to a file that is referenced by a script.
March 7, 2003, 2:26 PM
pileofcrap
shit I didnt think about that. But It would only do that if it was loading for someone THAT instant. I know its a possiblity but still there is a chance of that happening for anything. Also I dont exaclty think web languages work like that. I dont think that it wouldnt load the file just b/c someone else is viewing it. Once the page is loaded its done and you can do whatever. Itll just be text so it isnt like its gonna take more than 1 second to load.


And Iago, thats a good idea but I wont be uploading anything. The bot will dump the file out somewhere and the kids visiting my site will click a link that basicly goes back to my server.
March 8, 2003, 2:15 AM
Skywing
[quote]Well, he can upload it with a different filename then rename it.  That would make the quickest transition.  Or, he can write to a file that is referenced by a script.[/quote]
Writing to a file referenced by a script would probably cause the same problem.  Renaming it would only work well if the webserver's OS supports renaming a file while it's already open (WinNT/Win2K/WinXP let you do this with image-mapped sections).
March 8, 2003, 11:52 AM
Skywing
[quote]shit I didnt think about that. But It would only do that if it was loading for someone THAT instant. I know its a possiblity but still there is a chance of that happening for anything. Also I dont exaclty think web languages work like that. I dont think that it wouldnt load the file just b/c someone else is viewing it. Once the page is loaded its done and you can do whatever. Itll just be text so it isnt like its gonna take more than 1 second to load.


And Iago, thats a good idea but I wont be uploading anything. The bot will dump the file out somewhere and the kids visiting my site will click a link that basicly goes back to my server.[/quote]Yes, it'll probably work most of the time now, but what happens later when you've got something that's used frequently, like my BinaryChatISAPI program became?
March 8, 2003, 11:54 AM
pile@school
yeah I get what you are saying. Let me ponder it a bit and ill see exactly what I can do. Ill also ask my programming teacher for some advice on what he thinks I should do. Even tho he perfers ASM and JAVA over VB . lol
March 10, 2003, 7:08 PM
warz
pileofcrap - your name suits you well, but it'd be even better if you changed crap to shit.
March 10, 2003, 7:11 PM
iago
[quote]pileofcrap - your name suits you well, but it'd be even better if you changed crap to shit.[/quote]

Whether or not that is really warz, I would suggest banning that ip.
March 10, 2003, 7:45 PM
pile@school
yeah, whats up? Why are you talkin shit to me man ?
March 10, 2003, 8:03 PM
ILurker
hes talking to pileofcrap not you moron
March 10, 2003, 8:21 PM
Spht
[quote]hes talking to pileofcrap not you moron[/quote]

Note the similarity between "pile@school" and "pileofcrap"
March 10, 2003, 8:27 PM
St0rm.iD
OMG, I hope you were kiding ILurker.
March 10, 2003, 10:38 PM
pile@school
For real, why would I respond to it if it wasnt me. THINK!!! =)
March 11, 2003, 9:23 PM
warz
Because you're a pile of shit? I dunno.
March 11, 2003, 9:57 PM
pile@school
Pfhhhhhhhh ....... lol youll pay for that =D


anyway we are losing track of the topic here. anyone else have any ideas about it, please throw them my way. If i get a working copy up ill gladly share it with you guys (even most of you could probably code one faster than i could)
March 12, 2003, 6:56 PM

Search