View Full Version : Webpost Variables
R. Ludwig
27-08-2002, 08:16
Variables are transmitted by an http post.
server_adminemail
server_isplinkurl
server_ispname
server_ispcountry
server_platform
server_version_major
server_version_minor
server_version_release
server_version_build
server_port
server_name
server_uptime= in seconds
server_password= 1/0
server_type1= clan / public
server_type2= freeware / commercial
clients_current=
clients_maximum=
channels_current=
server_linkurl=
server_queryport=
MagicZip
27-08-2002, 15:16
Whats the new $Var for the current TSUser on the Server?
R. Ludwig
27-08-2002, 15:17
aehm..
clients_current ?
MagicZip
27-08-2002, 16:36
sicher ?! *g*
How about server_ip? serverip?
*edit nevermind got it
MagicZip
27-08-2002, 19:10
ups, sorry... i asked for the $var of current online user names, not for current number.
R. Ludwig
27-08-2002, 19:56
that u get by access the tcpquery port.
look at general server forum
How often does it send the http post? 3 minutes like TS1?
MagicZip
27-08-2002, 20:33
vielleicht habe ich mich wieder etwas falsch ausgedrückt.
Noch mal ein neuer Versuch ( vorab vielen Dank für die Geduld ).
Wie lautet die PHP Variable mit der ich die momentan auf dem TS Server befindlichen Usernamen in die DB posten kann?
Bei der TS Ver. 1x gab es die Variable $user.
MagicZip
27-08-2002, 20:39
@Gryphon How about server_ip? serverip?
$serverip= getenv("HTTP_X_FORWARDED_FOR"); // still works
Yeah I realized that, thanks I wasn't thinking.
Originally posted by Gryphon
How often does it send the http post? 3 minutes like TS1?
Found it, it's about 5 minutes.
viperjd3
28-08-2002, 06:11
what exactly are these for? To get TS2 to work with Webpost 1.0?
To work 'like' webpost 1.0 It pretty much needs to be rewritten. Here is how far I am now http://www.thzclan.com/ts2/
viperjd3
28-08-2002, 06:25
gryph, would you be kindly to allow me to use the code?
Yeah, I have a bit more to do then I will make it available to those who want it.
viperjd3
28-08-2002, 06:39
*Salute* Your awsome :)
GrimReeper
28-08-2002, 18:11
yeah he is awesome...... I've put the E-mail notivication on this one, coz I sure cannot wait 2 get it :D
BTW, I checked out your site..... lookes really cool. here comes a question : how do ya get a thing on the tastbar, like you did with the old version. Does it take it like a HTML code, or do you need 2 build some special Commands on it, so that it is on the taskbar ?
It just pulls the ip and users from the database and displays them on a webpage. I then use the marquee tag and tables to get it small enough to fit on the taskbar. Since the task bar uses IE to display it, the marquee tag should work for everyone.
GrimReeper
28-08-2002, 21:50
Cool....... will try it..... so it is just a normal page, that fits in it
And about the info from the server. wenn du you think you will give the code ?....... seen it works nicely on your site now
Hopefully soon. Depending how much I can slack from my real job ;)
GrimReeper
28-08-2002, 23:39
what part is not working then ?. Or are you trying 2 optimize it for speed resons or something like that ?
I'm not that good in that stuff..... just know you do it with the Fsocksopen command... a friend made me a UT serverstats script.
But if you need help at something you can't figure out, then ask me...... I can get allot of info from a friend (studying programming, and has his own dutch website for Webmasters.... one of the best there is in Dutch.
my info:
ICQ : 144250026
mail & msn : GrimReeper@home.nl
ICQ I use 14 hours a day..... so that would be the best choise if you have it :P
Seven_NL
29-08-2002, 10:03
Looks good Gryphon, any change I could get the code already ? :) * pretty please :D *
[KRIECH]Agent
29-08-2002, 11:10
I wrote this little script as an Interface between TS2.0 Servers and PSP/Mysql:
BE WARNED ! I'm using my own Database-Interface here (the references to $db), you will have to change this to another means of accessing your mysql database.
Basically what you need to know is, that "getQueryObj" sends a query to the Mysql-server.
But that shouldn't be too much of a problem, if you're firm with PHP/Mysql.
Here's the table-def:
CREATE TABLE clan_teamspeak (
id int(11) NOT NULL auto_increment,
ip varchar(30) NOT NULL default '',
port varchar(5) NOT NULL default '',
servername varchar(40) NOT NULL default '',
users varchar(10) NOT NULL default '',
password char(1) NOT NULL default '',
lastupdate int(14) NOT NULL default '0',
version varchar(25) NOT NULL default '',
maxusers varchar(5) NOT NULL default '',
public char(1) NOT NULL default '',
link varchar(255) NOT NULL default '',
uptime bigint(20) NOT NULL default '0',
PRIMARY KEY (id)
) TYPE=MyISAM;
Here's the script:
<?
/************************************************** *******************************************
Teamspeak-Server Interface
*/
//*** THIS IS MY DB-INTERFACE, CHANGE IT TO YOUR NEEDS
include "../class.dbinterface_mysql.php4";
$db = new dbInterfaceMySQL($DBSERVER, $DBNAME, $DBUSERID, $DBUSERPW, $DBERRORMSG_UNREACHABLE, "show_errors");
//************************************************** **
//*** THE FOLLOWING FILE IS INCLUDED IN THE OLD WEBPOST-SKRIPT 4 TS 1
include("ts_interface_getip.php");
//************************************************** *******
/************************************************** *******************************************/
$serverip = getVisitorIdentifier();
if ($serverip == "")
{
$serverip=getenv("REMOTE_ADDR");
}
// Add the server
$sql = "SELECT * FROM ".DBTAB_TS." WHERE ip='".$serverip."' AND port='".$server_port."'";
//*** THIS IS MY DB-INTERFACE, CHANGE IT TO YOUR NEEDS
$query = $db->getQueryObj($sql);
$anz = $db->getNumRows($query);
//************************************************** **
if ($anz > 0)
{
//*** THIS IS MY DB-INTERFACE, CHANGE IT TO YOUR NEEDS
$row = $db->fetchArray($query);
//************************************************** **
}
$id = $row[id];
$lastupdate = mktime();
$sql = "REPLACE INTO ".DBTAB_TS."
(id, ip, port, servername, users, password, lastupdate, version, maxusers, public, link, uptime)
VALUES
('$id','$serverip','$server_port','$server_name',' $clients_current','$server_password','$lastupdate' ,'$server_version_major.$server_version_minor.$ser ver_version_release.$server_version_build','$clien ts_maximum','$server_type1','$server_linkurl','$se rver_uptime')
";
//*** THIS IS MY DB-INTERFACE CHANGE IT TO YOUR NEEDS
$query = $db->getQueryObj($sql);
//************************************************** *
?>
N. Werensteijn
31-08-2002, 02:48
Keep up the good work Gryphon
Thanks, I am hoping to hear from Ludwig about a couple of things, but have not heard anything yet.
R. Ludwig
31-08-2002, 08:13
What u wanna hear ?
i am sorry that i am not 100% here, i am little sick and cant sit for a too long time currently.
No problem, I sent you a PM
R. Ludwig
31-08-2002, 08:24
ok fine by me :P
whitespirit
31-08-2002, 18:53
was it ever confirmed what the variable was for the list of usernames? (if there is one??)
clients_current seems to indicate the number of users, not there names...
I've edited webpost for postnuke and this is the one variable i got missing... you can check what i have done so far here:
http://www.isrighthere.com/modules.php?op=modload&name=tss2&file=index
TIA
- ws :cool:
There isn't, you have to query the server for that info.
whitespirit
31-08-2002, 20:55
ahh - ok,
thanks for the info it makes sense... is there a command to query and retreive the info as an array or something for use in php?
whitespirit
31-08-2002, 21:36
thanks for the succinct answer ;) I've not programmed using sockets yet, any web pages to give me a heads up on what is possible (other than php.net)?
also which socket would i connect to, for the query? is it 51234?
and any specific commands need to be sent to get the users names?
sorry if these seem lame questions to anyone, but i've looked around the forums and haven't found an answer. And i know it's early days for this new release, so I don't expect an immeadiate answer...
BTW: Great work guys on this application a top app by a top team.
cheers
- ws :cool:
ScratchMonkey
01-09-2002, 00:11
One of the web post variables is the socket number to connect to for TCP queries.
Originally posted by ScratchMonkey
One of the web post variables is the socket number to connect to for TCP queries.
server_queryport=51234
[TS]
error
error
....
where can i find the allowed commands?
especially for finding actual user names.
@ Gryphon
You programmed a very good script.
To get when it so far login.php the file?
Or when do you have to realasen before this Script?
I hope very soon however if it am possible
I also with the version contently would give which you for the
moment yet do not offer myself.
Can I have perhaps the login.php ?
cya
and thank for all your work
DjHope
Barking_Mad
03-09-2002, 05:52
hehe
http://www.aovc12.dsl.pipex.com/yoda_award.jpg
GrimReeper
03-09-2002, 12:02
LOL.
djhope, mach es mal ins Deutsch, dann sets ich es uber nach english. Dein english ist nicht zu verstehen :S
ICQ: 144250026
===in english:=======
I told em 2 write it in german, then I'll translate it, coz his grammar is a bit hard 2 understand
Da vertraut man einmal einen Translator im I - net und dann versteht man es ned :D
Was ich sagen wollte *g*
------------------------------------------------------------------------------------
@ Gryphon
Du hast ein sehr gutes Script da programmiert.
Wann könnte man die login.php datei bekommen ?
Oder wann wird es soweit sein das man sich das script runterladen kann ?
Ich währe auch schon mit der version zufrieden die Du hast aber die du noch nicht zum Download anbietest.
Kann ich vielleicht die login.php Datei jetzt schon haben
cya
und nochmal danke für all eure arbeit
DjHope
------------------------------------------------------------------------------------
So das wollte ich eigentlich sagen *g* und wenn du GrimReeper es nochmal überstzen würdest dann würdest du mir sehr helfen.
P.s. Schade das es kein Deutsches Supportforum gibt für Webpost
Und noch eine Frage kann man irgendwie ein Server password mit in die login.php datei aufnehmen ?
und Wie ist diese login.php aufgebaut
danke für eure hilfe
cya
DjHope
Originally posted by djhope
------------------------------------------------------------------------------------
@ Gryphon
Du hast ein sehr gutes Script da programmiert.
Wann könnte man die login.php datei bekommen ?
Oder wann wird es soweit sein das man sich das script runterladen kann ?
Ich währe auch schon mit der version zufrieden die Du hast aber die du noch nicht zum Download anbietest.
Kann ich vielleicht die login.php Datei jetzt schon haben
cya
und nochmal danke für all eure arbeit
DjHope
------------------------------------------------------------------------------------
hoffe mal das ist richtig :):
You coded a very good script. when is it possible to download the final version? i would be very happy if you send me the actual version of the script (not yet released). may i perhaps get the login.php now? cya - i wanna thank you for your work another time. DjHope
GrimReeper
04-09-2002, 20:52
The real text from DJhope:
@ gryphon
You've made a real good script
Wenn can we get the information from the login.php
Or wenn will it be finished, so that we can download it?
I was allready happy with the version that you got, but that you don't over as a download yet.
Cya
and again thanks for all you work
DjHope
===========
2e msg:
And another question. How can I get the server password into the login.php ?
And how is that login.php constructed (build up)
thx for the help
cya
DjHope
================
Probebly still not the best english in the world, but I think it is easier 2 understand now :P
@djhope : wann du dein deutsch mit gutten gramatiek in ein translater macht, dann geht es gut. Aber du soll wirklich uberal denn . , u.s.w. brauchen.
Lol English for Insiders!!!
vBulletin® v3.7.3, Copyright ©2000-2009, Jelsoft Enterprises Ltd.