Call Of Duty: PHP RCon 2.40 EN++

Utility ke hrám
ringo
Posts: 3
Joined: 17. 07. 2013 09:43

Re: Call Of Duty: PHP RCon 2.40 EN++

Postby ringo » 18. 07. 2013 09:48

I got what I inquired about early to work beautifully, but I have a few more questions. I wanted to pass another variable, specifically the %m

Code: Select all

// $custom_cmds[] = 'PB Kick+msg/pb_sv_kick %n 15 "%m"/1'; 
that you have for that, but instead of having the reason passed to the rcon command, I wanted to pass it to the url. Any idea on how I can use what you have established here to implement that?

Essentially

Code: Select all

$custom_cmds[] = '*(POP UP BOX BEFORE CONTINUING HERE and pass to url)<a href="javascript:;" class="rconbtn rbc_banclient" onclick="var o=$(this).parents(\'tr\'); var u=\'../test/add1.php?name=\'+encodeURIComponent(o.attr(\'username\'))+\'&ip=\'+encodeURIComponent(o.attr(\'userip\')); window.open(u);">Ban</a>';  //just insert this code to each player (begins with *)
or some iteration of that.

This is what it looks like so far
Image
ringo
Posts: 3
Joined: 17. 07. 2013 09:43

Re: Call Of Duty: PHP RCon 2.40 EN++

Postby ringo » 22. 07. 2013 06:32

The next issue I have to figure is how to compare IPs from the query to my database and if one exists issue an rcon command to kick that client ID. This is the major issue that is currently baffling me. I can query my database and store the IPs in an array but comparing the game query to the array is what I don't understand how to accomplish.
User avatar
Ashus
Administrátor
Posts: 417
Joined: 07. 07. 2007 10:51
Location: Ostrava - Polanka nad Odrou
Contact:

Re: Call Of Duty: PHP RCon 2.40 EN++

Postby Ashus » 25. 07. 2013 17:31

PHP Rcon can't do that. You'd have to write a bit longer script to make it work. Use prompt for the message and then window.open or window.location.
My implementation redirects you to another page, where you fill in the reason or whatever text you need.

If you need to compare if it's already banned and you're not using subnets, you could put each ip on a new line to a separate file. Then by using $ip_list = file('filename.txt'); you put them to an array. Simple in_array($_GET['ip'],$ip_list) returns true or false whether is's been banned before or not.
However you could also use a database and search for anything faster. But some basic sql knowledge is required in addition to plain PHP.
Image
Coffee phreak!
Fanzy

Re: Call Of Duty: PHP RCon 2.40 EN++

Postby Fanzy » 22. 08. 2013 17:00

I'm getting an error
Error while connecting to gameserver; server is down or the map may be changing right now.
With PHP5, register_global = off, all my config are correct and this is done on a VPS using webmin. PLEASE HELP!
Gryphus_1

Re: Call Of Duty: PHP RCon 2.40 EN++

Postby Gryphus_1 » 27. 08. 2013 10:56

Hey,

I've been trying to figure out how get back the raw server info for CoD4 servers without needing RCON passwords. Similar to the way Xfire does it.

I have had no luck just trying to find out the basic methods on how to do it. So I was hoping I could get some help.

G1
Klick3R

Re: Call Of Duty: PHP RCon 2.40 EN++

Postby Klick3R » 13. 02. 2014 00:35

Hello,
Im currently woking on a clan server, now im trying to use phprcon on the server so the admins can manage the server, but now for some reason i can get it woking, i have tryed:
running php rcon form same server with external and localhost ip
running php rcon from my personal computer

now i cant figure out what's wrong... ips and ports are all correct.. any suggestions?
Klick3R

Re: Call Of Duty: PHP RCon 2.40 EN++

Postby Klick3R » 13. 02. 2014 00:44

now ill have to add that i can use other admin tools to connect... but not rconf so i imagine the problem is the webserver in some way... im using wamp...
Klick3R

Re: Call Of Duty: PHP RCon 2.40 EN++

Postby Klick3R » 13. 02. 2014 00:47

im so frustrated that i forgot to add the error msg :)
Error while connecting to gameserver; server is down or the map may be changing right now.
Dariush

Re: Call Of Duty: PHP RCon 2.40 EN++

Postby Dariush » 06. 03. 2014 14:20

Hi Guys
Thanks For This Script
I Have A Problem , How Can I Add More Server In PHP Rcon?
In Readme.txt In PHP Ron Say

Adding more gameservers:
Edit servers.inc.php - add new server on each line, the first one on the list is default. Server string syntax is '(game) (server_name) (Friendly name)', where game is 'cod1', 'cod1uo', 'cod2', 'cod4' or 'cod5', server_name is name of configuration file located in servers/ (eg. myserver -> servers/myserver.inc.php), Friendly name is the one you see in combo-box selecting other servers (and logging uses it as well).
Create configuration file in servers/ subdirectory. Enter at least IP, port and rcon password, other configuration may be used from cascaded configuration files.

But I do not know what to do
Plz Help Me , Thanks
Larox
Posts: 1
Joined: 18. 09. 2014 10:10

Re: Call Of Duty: PHP RCon 2.40 EN++

Postby Larox » 18. 09. 2014 10:25

Hi)
On the sly for the year slowly. Created a sql database, connected cron, wrote many new php scripts. Rewrote and improved the scripts and their performance. Players databases, ip-range bantool, nicname bantool, badnames works with sql, last player visits on server, easy players seraching in db, new js. scripts & more. Special mod plugins for cod1, cod2 and soon cod4 compatible with php cron. Left copyrights Ashus.
Thank you very much Ashus.
Attachments
2.png
2.png (18.56 KiB) Viewed 941 times
1.png
1.png (172.27 KiB) Viewed 941 times

Who is online

Users browsing this forum: No registered users and 1 guest

cron