View Full Version : Help Needed !!!
crazyandy
10-03-2007, 15:39
Hi I need some help,
I need a php script that I can click a button and it will start my teamspeak server using the "./teamspeak2-server_startscript start" method.
If anyone knows how to do this or can help me I would be very greatful.
Thanks in advance, Andy
Hi I need some help,
I need a php script that I can click a button and it will start my teamspeak server using the "./teamspeak2-server_startscript start" method.
If anyone knows how to do this or can help me I would be very greatful.
Thanks in advance, Andy
Did you tryed the webadmin of the TeamSpeak server ?? but yes not secured to submit password thru the internet ...
yes, I do in my php some shell/command_line commands like ping bla bla
when I will be before my pc I add some screenshots here
when you click it will be posted (your choose)
so it won't be difficult to make something that simple as you want (for you ;)).
maybe better will be talk about it ... to you specified more cleary reasons and I can find better ansver ....
.. I don't want to write here everythink wich is connected with this ...
... also can do something else when talk ...
... later sry..
crazyandy
11-03-2007, 19:15
Well do you know how to do this then.
If so can you give the the php code or some where that has it plz
Thanks Andy
yes I can what I want to say it is not so simple with access rights ...
(in system Linux .... you should know that, but I can't if you do
//because not mentioned. )
http://tpc.webyt.net/Files/tmp/TS_statistics/pinger.png
//cs only sry 4pieces 20pieces with size normal or 1MB
well I can post this but you didn't like it ...
Do you write something in php before ??
simply use the php function like (copyed from mine) +edit
$ext_OS_bash='D:\WINDOWS\system32\cmd.exe /C '; // OS Win
$ext_OS_bash='/bin/bash -c '; //OS Lin not tested ... sry
$cmd='command';
$ret = exec ($ext_OS_bash.$cmd, $data);
//or other the better way specify for me ... when you find the time ...
sry for that english
crazyandy
12-03-2007, 16:53
OK I am having a bit of trouble reading what you have just said above.
Some of it makes sence but most of it doesnt.
All i am looking for is the php code that will execute the "./teamspeak2-server_startscript start" command on linux.
I have writen some php before but nothing that envolves exicuting server side commands.
So if its possible to try and explain this a bit better that would be great and I do understand that english is not everyones first language.
Many thanks,
Andy
Katana*GFR*
12-03-2007, 21:35
You would be easyer off by just logging in to that server.. What you want, wether for Linux or Winblows, is so complicated..
Your better of using either VNC Viewer ( windows, or any other remote admin tool ) or SSH ( linux )
crazyandy
15-03-2007, 17:20
Yes I can use a remote admin tool, but I want to give other users permission to start the server, but I dont want to give them the login or password for the account.
So I need some kind of php script so that they can start the server from a web page.
Thanks for the help,
Andy
Katana*GFR*
15-03-2007, 17:33
can't you create a limited account? With only acces to the specified directory. Maybe a even a new directory with only a shortcut?
crazyandy
17-03-2007, 15:58
well the thing is that most of the users that use my server dont and wont know how to use remote login. For example putty.
The other thing is that most of them wont even borther to use putty even if they did know how to.
So i just need a simple script that users can click a button on my website and the server will start and then they can join.
Seems simple, but I am gussen this is easyer said than done.
I would prefer it in php as I know it the best.
Any help would be very nice.
Andy
ok.... you are not on TS now (at this weekend) so I decide to post it.
there are few options + results:
1. I can't give to login or su commands the passwords (also for security reasons of linux not me) in the one command .
2. you can start that servers every computer start ...
3. if you do not care so much about security you can use that php code .... but the TS server will be running under user apache so only next thing you need is change rights on folder with TS server (for that user apache best thing is to choose usergroup apache).
update-forget
4. cron task wich will check if TS server is running or not and fix it to run for example every 5min
you can put it on the server and see the output
//ping.php
$OS_bash='/bin/bash'."\n"; //wich program execute I choose bash wich is console ....(command line)
$cmd='';
// $cmd.='who am I'."\n"; // this should return current username
$cmd.='ping localhost -c 10'."\n"; // ping command
$ret = exec ($OS_bash.$cmd, $data);
echo '<br />'.$ret.'<br />'; // only the result line of that (last) command
$n=count($data);
for ($i=0;$i<$n;$i++) echo $data[$i].'<br />'; //every line of the command
crazyandy
18-03-2007, 22:11
I would just like to say a very big thank you to Tomas for all the superb help he gave me on my problem.
He really knows his stuff when it comes to linux and programming.
If it wasnt for Tomas and his great skills I woukd still be stuck where I was.
Many Thanks Tomas for all your great help,
Andy
PS. Your the kindest person that I have talk to on this form, Far above certian others (which I won't mention, as I may get kicked off the form. But they know who they are.!!!!!!)
Calm down I only do a few simple things(for me).
( I also get next experience with online_help(thaks to one app)... in OS Windows )
And explain you a few basic commands in Linux.
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.