Jump to content

Help with some PHP..


Recommended Posts

Posted (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 by Benedict
Posted

try to change $_GET["playername"] to $_POST["playername"]

  • Upvote 1
Posted

Can also use $_REQUEST['playername'] which covers both _GET AND _POST

Posted

Would that make a difference to my script? cose if not ill just leave it like this:P

Posted

It isn't of much relevance now, but perhaps in the future...

Posted

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>

Posted

Actually the code tags would not let me post any PHP the otherday so I had to hotlink.

Posted

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...

Posted

Most likely has to do with what the code contains, to prevent it from breaking/exploiting the board.

Posted

However, that is not what this thread was meant to be about ;)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.