Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Klyx99

  • Rank
  1. O programmer err - script above is fine. My server was lagging and was able to see if "flash" up and disappear. Apparently there is an issue with the batchfile - paths need to be absolute, The script has it relative, thus why it works from file manager, but not the browser. I'll leave the code up for anyone that wants to make something similar as reference.
  2. I have two functions that execute an exe program (personal project for a minecraft back end.) Windows only. First one will execute the sending of commands (THIS ONE WORKS) /* check to see if admin is sending commands to terminal via web */ if(isset($_POST['command'])) { $content = $_POST['command']; writeMCCommandTxt($content); try { exec(SERVER_DIR.'mcCommand.exe',$output); } catch ( Exception $e ) { die ($e->getMessage()); } }// END COMMAND ENTRY This has been a head scratcher for most the week - any help or suggestions would be great!! thanks!! HTML <div id="commands"> <div id="command_input"> <form method="post" id="commandForm" action="index.php"> <label for="command" >Console Command:</label><br/> <input type="text" name="command" autofocuS/> <input type="submit" name="submit_command" value=" >> " /> &nbsp; <input type="button" value="Refresh page" onclick="location.reload(true);" /> </form> </div> </div> This is used to start the server // STARTING SERVER if(isset($_POST['startServerBtn'])){ try { exec(SERVER_DIR.'startServer.bat 2>&1' ,$output); } catch( Exception $e ) { die ($e->getMessage()); } } HTML <div id="server_control"> <ul> <li> <form action="index.php" method="post"> <input type="submit" value="START" id="startServerBtn" name="startServerBtn"/> </form> </li> </ul> </div> MCCOMMANDS.EXE will work from both browser(php) and file manager(tested) the STARTSERVER.EXE will NOT work from browser(php), but will work from file manager The function IS being accessed - debug is showing it going there, and it seems to be running Both exe's are in the same folder
  3. OK, here is the source (for anyone interested) I got the online games to use the player count tables, thus eliminating that horrible script in previous post LOL. Much faster. JOIN was tricky to learn. but works here prefectly. $sql = " SELECT * FROM onlinegames AS og INNER JOIN playercount AS pc ON og.gameid = pc.gameid WHERE gamename LIKE concat('%', :needle, '%') ORDER BY pc.playercount DESC ";
  4. OK, so Joining works (makes my prev post and example looks trashy LOL) meh, learning process - thanks for the Joining tip. Keep in mind, IM old school from the 80's, so qb, gb, pascal basic and vb1-5. Recently last several years, chose php/mysql as my fav language 🙂 But its a hobby an love learning it
  5. in that particular script, 1st to load all the player counts $onlinecounts then loop through that array using the gameid and loop through all theonline games updating the player count form the online counts. I didnt think about JOINING. let me try that. Agreed on the connect(), I am still cleaning up the code - that is on my list 🙂
  6. Well this is goofy. I realized I need to add a player count (which is from another feed) to the online games. I currently store the gameid and player count in another table. the player count from that table should be added to the onlinetable.playercount this script taks over 3 - 5min vs the 30seconds for the other 7 tables. Any ideas what I could do to speed this up. Normally this is not an issue, but it is during a search as I want to use a player count to sort it by (note player count is NOT in the online games feed, it is in a separate feed for some weird reason, I say weird because only the online games use the player count) $sql = "SELECT * FROM playercount"; $stmt = $db->connect()->query($sql); $stmt->execute(); $onlineCount = $stmt->fetchAll(PDO::FETCH_ASSOC); foreach($onlineCount as $onlinegame) { $online_update = "UPDATE onlinegames SET playercount = :playercount WHERE gameid = :gameid"; $check = $db->connect()->prepare($online_update); $check->execute($onlinegame); }
  7. ok, CRON done.7 feeds into 7 tables 43 seconds (missing one table I will add later for Mac - can't leave them out - they're worse than linux users when it comes to games LOL) Incredible - and here I thought I got it down to 9 min and I was rockin!!! LOL
  8. omg I am so dumb I forgot I could do all this in php der!! LOL I found a similar one from a few of my old sites (2010)using curl - prety fast on the download, but bottle necked with the old way of processing. Now I'll put it todgether with the LOAD command. minor change in my maint job
  9. Ya I think that is the way to go. with that speed I can now do all 9+ rss feeds that pertain to the overall collection. My test showed about 5min 8 tables, where before it was around 15min top.. HUGE diff, as when I put it on my server (little more beefier) I am expecting all the tables to process around 1-3min tops. That was a very nice tip! Currently making a batchfile to run it all (cept having issues with wget grabbing the xml file) but that is for a different thread. I'll figure it out LOL
  10. yes that is exactly what I did. Very surprised at how fast that processed it. Im at work, so using the old tried and true Thinkpad w530 (20gbRAM) lol and both times took roughly 9 - 15seconds. So thinking outside the box, Instead of using cron.php to run a long and grueling import, I'll write a batch file (will post it here for others) to process all the data. Thanks for that tip!! Was extremely helpful!!! Not sure if there is a SOLVED button, but if not, i'll edit the title
  11. WELL I just tried the LOAD comand - and BAM 9 seconds on my OLD THINK PAD!!!! Think that might be the way to go! EDIT: forgot to mention i did that at the cmd prompt, but that would be an easy batch file to make and run at midnight
  12. Been an affiliate for 9yrs, last few years been tinkering with creating my own site vs the ugly stock one they have.. Great learning process.
  13. sure! Here you go, there are about 5,000 others of them but felt one was enough LOL <gamexml> <title>Big Fish Games - Game Archive</title> <description>A New Game Every Day</description> <copyright>© 2018, Big Fish Games, Inc.</copyright> <pubdate>Fri, 16 Nov 2018 05:15:32 -0800</pubdate> <game> <gameid>17915</gameid> <gamename>1 Moment of Time: Silentville</gamename> <family>1 Moment of Time: Silentville</family> <familyid>7237</familyid> <productid>13231</productid> <genreid name="Puzzle">4</genreid> <allgenreid>4,15,21,27,119,123,124,125,126,143,147</allgenreid> <shortdesc>Uncover a mystery and save a town from a curse.</shortdesc> <meddesc>Once upon a time in the small, undistinguished town of Silentville people started disappearing. Help uncover the mystery behind these disappearances and save the town from a curse!</meddesc> <longdesc>Uncover a mystery and save a town from a curse in 1 Moment Of Time: Silentville! Once upon a time in the small, undistinguished town of Silentville people started disappearing - one by one. Even the visitors suddenly disappeared without a trace. Airplanes and birds, trains and pedestrians, drivers, tourists and even bicyclers - all of them have vanished! Will you be able to solve the mystery and release Silentville from its cursed non-existence?</longdesc> <bullet1>Beautiful graphics</bullet1> <bullet2>Original mini-games</bullet2> <bullet3>Intriguing story</bullet3> <bullet4>Check out our Blog Walkthrough</bullet4> <foldername>en_1-moment-of-time-silentville</foldername> <price>$ 6.99 USD</price> <hasdownload>yes</hasdownload> <macgameid>27210</macgameid> <hasvideo>yes</hasvideo> <hasflash>no</hasflash> <hasdwfeature>no</hasdwfeature> <gamerank>2401</gamerank> <releasedate>2012-06-17 00:00:00</releasedate> <gamesize>528691151</gamesize> <systemreq> <pc> <sysreqos>Windows XP/Windows Vista/Windows 7/8</sysreqos> <sysreqmhz>1.8 GHz</sysreqmhz> <sysreqmem>512</sysreqmem> <sysreqdx>8.1</sysreqdx> <sysreqhd>518</sysreqhd> </pc> </systemreq> </game>
  • 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.