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
https://forums.phpfreaks.com/topic/255034-page-processing-to-quickly/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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