Jump to content

Page processing to quickly?


herghost

Recommended Posts

I seem to be having a problem with the below script, on the 1st run it doesnt print the $variables, but on refresh these a being written to file once?

 


if(isset($_GET['sprop']) && ($_GET['sprop'] == "update"))
{

//my connection stuff
//
//
$playername = "userid"; 

$nether = $_POST["nether"];
$lname = $_POST["lname"];
$query = $_POST["query"];
$flight = $_POST["flight"];
$portdd = $_POST["port"];
$rcon = $_POST["rcon"];
$seed = $_POST["seed"];
$sip = $_POST["sip"];
$wlist = $_POST["wlist"];
$san = $_POST["san"];
$omode = $_POST["omode"];
$pvp = $_POST["pvp"];
$dif = $_POST["dif"];
$sname = $_POST["sname"];
$gmode = $_POST["mode"];
$pmax = $_POST["max"];
$sm = $_POST["sm"];
$view = $_POST["view"];
$motd = $_POST["motd"];

sleep(3);

$sftp = new Net_SFTP($ftp_s);
if (!$sftp->login($ftp_u, $ftp_p)) {
    exit('Login Failed');
}

echo $sftp->pwd() . "\r\n";
$sftp->put
("/root/mc/server.properties", "allow-nether=$nether
level-name=$lname
enable-query=$query
allow-flight=$flight
server-port=$portdd
enable-rcon=$rcon
level-seed=$seed
server-ip=$sip
white-list=$wlist
spawn-animals=$san
online-mode=$omode
pvp=$pvp
difficulty=$dif
server-name=$sname
gamemode=$gmode
max-players=$pmax
spawn-monsters=$sm
view-distance=$view
motd=$motd");
}

 

As you can see, I have try adding a sleep to give it time to catch up but something tells me the variables are not being set 1st time for some reason, can anyone shine any light on this?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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

  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

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.