|
Shade Newbie
Joined: 09 Mar 2006 Posts: 4
|
Posted: Fri Jun 20, 2008 3:55 pm
#URL functionality |
Hi all,
I am hoping that you can offer some ideas as to achieving the following:
I figured it would be a great idea to use my own domain with php/sql to create a central general use counter system. I mud from various places and often have counting scripts to track how many runs/attack types etc I do - but because of having several lots of zmud settings in various places it would be great to link to my domain to use as a counter instead. Expanding further on this idea, I could create accounts for multiple individuals and allow many people to track their own counters and even communal counters etc etc.
Well, that’s the idea anyway.
Because of the multiple-account side - I do not want to be sharing my online passwords to anyone for access so I figured the #URL command could be used with specific url queries that accessed specific account counters similar to the following:
Code: |
#URL http://www.mydomain.com/counter.php?account=me&accountPassword=mePass&counterId=KILLS&adjust=1 |
This would simply call the counter.php page where I have the scripting coded to connect to the db, check for the correct account/password and all being well increment a counter labelled KILLS by 1.
Simple eh ? Well, no.
First off the #URL command appears to be very basic in functionality. Routing through help files reveals there is nothing to the command other then opening up a new window each call. Ideally I don’t want a window at all but at the least if the same window could be used then I could make a functional script easy enough. Is there any hope ? - I am secretly hoping there is more to the #URL command then meets the eye, some kind of window targeting or even window disabling (defeats the object of the #URL command, I admit, but perfect for what I am after!)
This topic here touches on some potential although it would mean distributing mySql passwords around to everyone which I do not want to get into. I just want zmud to manage the url query string which keeps the functionality simple for the user and passes over the complicated stuff to the script in the .php page.
Thanks in advance for any advice.
Steven |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Fri Jun 20, 2008 4:10 pm |
Not really possible with the tools in zMUD. It's possible it might be added to CMUD, but unlikely. One thing you could do in CMUD, though, is use a language with some sort of HTTP library that'll do this for you. I know Lua has a http library that'll do this just fine.
|
|
|
|
Shade Newbie
Joined: 09 Mar 2006 Posts: 4
|
Posted: Fri Jun 20, 2008 9:33 pm |
Awwww, *snap*
Okies, thanks for the response. Always good to find out these things before spending days trying to force a solution! |
|
|
|
Dharkael Enchanter
Joined: 05 Mar 2003 Posts: 593 Location: Canada
|
Posted: Mon Jun 23, 2008 6:31 pm |
Alternative
Code: |
#var xmlHTTP %comcreate("MSXML2.XMLHTTP");
#call @xmlHTTP.open( "GET", "http://www.mydomain.com/counter.php?account=me&accountPassword=mePass&counterId=KILLS&adjust=1",0);
#call @xmlHTTP.send(); |
That should do get the job done.
You need to have MSXML 3.0 or later installed which I think that, unless you're running win98 with ie5 or earlier, you probably already have.
If you don't MSXML can be easily downloaded from Microsoft.
This will work in zMUD or CMUD. |
|
_________________ -Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style." |
|
|
|
|
|