herghost Posted January 14, 2012 Share Posted January 14, 2012 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? Quote Link to comment https://forums.phpfreaks.com/topic/255034-page-processing-to-quickly/ Share on other sites More sharing options...
herghost Posted January 14, 2012 Author Share Posted January 14, 2012 Strangely, this only effects my local wamp server, as soon as put live works as expected! Quote Link to comment https://forums.phpfreaks.com/topic/255034-page-processing-to-quickly/#findComment-1307699 Share on other sites More sharing options...
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.