MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
Tutorial: Send a RCON command to a server with PHP
Tutorial: Send a RCON command to a server with PHP
Posts: 1
Threads: 0
Joined: Mar 2009
Reputation:
0
03-21-2009, 04:14 AM
(This post was last modified: 03-21-2009, 04:17 AM by alfredas .)
Hello, I added few functions in this script, but I have problem... I added this:
$date=date("Y-m-d_H:i:s");
And this is a small piece of full script:
// Ip address and port
$_ip = '192.168.1.109' ; // server ip
$_port = '27015'; // server port
$_password = '123' ; // your rcon password
$s2 = '';
$command = 'say $date'; // the rcon command! Put the command you want here
$requestId = 1;
So I have problems with this line: $command = 'say $data'; , how I can fix it, that in my server will be written data? I had tried this methods:
$command = 'say "echo $date"';
$command = 'echo $date';
$command = 'echo "echo $date"';
Posts: 58
Threads: 7
Joined: Dec 2008
Reputation:
0
Going to make a control panel from this.
Posts: 1,321
Threads: 85
Joined: Feb 2008
Reputation:
11
(03-21-2009, 04:14 AM) alfredas Wrote: So I have problems with this line: $command = 'say $data'; , how I can fix it, that in my server will be written data? I had tried this methods:
$command = 'say "echo $date"';
$command = 'echo $date';
$command = 'echo "echo $date"';
$command = "say ".$date;
~ trewq
Posts: 2,440
Threads: 73
Joined: May 2009
Reputation:
33
I would say
Code:
$command = 'say '.$date;
Would look cleaner considering the kind of quotes you use more...
Looking for a game server? Visit
fullfrag.com and pick one up as low as $2.50 / mo!
Posts: 1,321
Threads: 85
Joined: Feb 2008
Reputation:
11
(10-23-2009, 06:18 AM) loopyman Wrote: I would say
Code:
$command = 'say '.$date;
Would look cleaner considering the kind of quotes you use more...
Yes but you could also do:
PHP Code:
<?php
$command = "say $date " ;
~ trewq
Posts: 2,440
Threads: 73
Joined: May 2009
Reputation:
33
True :3
Looking for a game server? Visit
fullfrag.com and pick one up as low as $2.50 / mo!
Posts: 1
Threads: 0
Joined: Mar 2011
Reputation:
0
Lolx...Thanks for share with us good posting
Posts: 1
Threads: 0
Joined: Jun 2012
Reputation:
0
This is very helfull thank you for posting.
Posts: 10
Threads: 4
Joined: Mar 2010
Reputation:
0
this is AWESOME, just what i was looking for.
It does work great, runs the command pretty well but for some reason, it will randomly hang for about one minute or less.
I have also noticed that my server console prints: rcon from xxx.xxx.xxx.xxx:61152 for instance, and on the next command, the port number increments +1, so 61153.
Users browsing this thread: 1 Guest(s)