Benedict Posted April 8, 2010 Posted April 8, 2010 (edited) Hi, I am using Wolfcon for my BFBC2 server administrating, it has a function that reads a txt file off of the internet and makes a reserve slot on the server for that name. So now i need a PHP script that can write to a txt file for me if some one enters a name. In zip of the rcon program there is a php script, but it didnt work for me. I asked the gamservers.com people and they fixed it (kind of) before it didnt write anything to the file, now it writes blank lines. I was hoping that one of the bright minds on this forum could help me out or point me in the right direction.. this is what i have right now (attached) *edit putting php in a post seems to actualy execute it? i couldn't post with it in the message body? that cant be good right.. index.php Edited April 8, 2010 by Benedict Quote
Squealer Posted April 8, 2010 Posted April 8, 2010 try to change $_GET["playername"] to $_POST["playername"] 1 Quote
Benedict Posted April 8, 2010 Author Posted April 8, 2010 Oh wow, you are my hero! thanks loads. +1 for you ;) Quote
MaydaX Posted April 8, 2010 Posted April 8, 2010 Can also use $_REQUEST['playername'] which covers both _GET AND _POST Quote
Benedict Posted April 8, 2010 Author Posted April 8, 2010 Would that make a difference to my script? cose if not ill just leave it like this:P Quote
Squealer Posted April 8, 2010 Posted April 8, 2010 It isn't of much relevance now, but perhaps in the future... Quote
Piggy Posted April 11, 2010 Posted April 11, 2010 Just an FYI, if you want to post code next time just use the code tags in your post. Example: <html> <head><title>LOL</title></head> <body> <p>BLARG</p> </body> </html> Quote
Kolor Posted April 11, 2010 Posted April 11, 2010 Actually the code tags would not let me post any PHP the otherday so I had to hotlink. Quote
Piggy Posted April 12, 2010 Posted April 12, 2010 Actually the code tags would not let me post any PHP the otherday so I had to hotlink. <?php function hello() { echo "Hello World!"; } ?> Works for me... Quote
Kolor Posted April 12, 2010 Posted April 12, 2010 Going OT here but I get: Method Not Implemented POST to /forums/index.php not supported. when I try to post this wrapped in code tags: http://voice.deadhooker.co.uk/src.phps Quote
Piggy Posted April 12, 2010 Posted April 12, 2010 Most likely has to do with what the code contains, to prevent it from breaking/exploiting the board. Quote
Squealer Posted April 12, 2010 Posted April 12, 2010 However, that is not what this thread was meant to be about ;) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.