Jump to content
MakeWebGames

Macintrash

Members
  • Posts

    24
  • Joined

  • Last visited

Macintrash's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I wonder if it's mediawiki itself, or the bots that flood it. Anyway, i moved the wiki folder back a directory and replaced the index with a redirect :) I be trollin the bots. Since the move, things have gotten a lot better. I suspect it was the bots trying to spam it. A tip to everyone: host a wiki elsewhere! Even if this means a new and cheap domain purely for the wiki.
  2. A couple of days ago my host moved me to a limited server to due "excessive resource usage". My site has been going for 4 years now but i never really checked the usage monitor until now. 2% of CPU, 8% of memory, 140 SQL procs. Horrible! I know! Its never been that high. It went from 1% of each to a massive amount in 3 days. The worst part? The site is and has been offline for 3 days, and the resources are still heavily used! The crons have been cutoff from their mysql connections, the game itself also has mysql.php disabled... has been disabled for 2 days. The usage is still deadly high! The ONE thing i suspect is my WIKI. This all happened as soon as i disabled my wiki from allowing bots to spam it, rather than using robots.txt, i just disabled a useragent with "bot" in it from connecting properly. Is it possible the bots are getting revenge? Is it just my scripts infinitely looping in the memory? I can show you my usage stats if youd like. This is frustrating, anyone ever experienced this before?
  3. This code is useful, however, in a situation where you need it ran once a second, but its being ran 10 times a second because its in header.php. Say theres lots of people clicking at once, the script is unnecessarily ran more than once per second. If you were to take advantage of this, you would actually lighten the load on your server, right? It seems to work for me, correct me if im wrong.
  4. Well i suppose it wont, now that i think about it. I forgot that the server executes the PHP either way, rather than the user executing it(Oops, getting too used to C++), this is just forcing it to execute every second rather than once per click. Oh well, i guess i need to find a new way to run big scripts without problem. :(
  5. Because we have one for days and minutes. Why not seconds? Regarding the bandwidth: This is only good for people with unlimited bandwidth, if your host limits you, keep it light. I suppose it could take a lot up, IF you overload it, can someone explain to me how this would destroy your bandwidth if it just runs a little script that removes people from prison if they are under level 5?
  6. <?php //global func, mysql include, global $c... etc $i = 1; while ($i <=60) { $i++; //Your code goes here, it will be run every second. sleep(1); } ?>   Make this a cron, and make it run every minute. It will restart every minute, but it will run for 1 second for 60 loops. As soon as its done, the cron restarts and continues running. I have tested it and it works. Its great for codes that slow down header.php, large operations/checks can be moved here to put not even a dent in the server load, whereas putting them in header would slow down loading by at least 1 or 2 seconds.
  7. Ok exactly 20 seconds ago i have narrowed it down! I have found out that it allows me to have one account logged in at http://www.mygame.com, and a different account at mygame.com at the same time
  8. Now i dont know if this is common, but occasionally while playing, i will click on a profile of a new account and it will log me out. It doesnt unset my session though, because i can go right back into the game by entering in a new URL. What makes it even more confusing is i can have 2 accounts right next to each other, and i open them both in new tabs. ONE can work, and the other will send me straight to the login page. I know its not a hacker because its been happening for a year and it only happens with new accounts and while using items. I looked at the "if session=0 header:login.php" code on a page that works fine compared to a page that causes a logout, and they are identical. What is causing my account to logout when i go to specific pages? I know for a fact my session is still intact, plus it even let me login to a new account while the other is still logged in. Where can i view my cookies/sessions to see whats really going on and how can i fix this?
  9. NarutoPRG, interested in space? Lucky me, that must mean you make a lot of space graphics. Im the owner of universalcriminal, maybe you can get me some images made some time :) Ill keep you on tab if i need you :)
  10. Back in 2007 i joined a game that was only 1 year old, it was fun. Soon after that, i invited friends. We all played it and loved it. Then in 2008 it had a reset. I started coding as a complete noobie there to assist the owner because the original coder left. I became full time coder and soon had to start running the game on my own due to owner absence. Since then i made negotiations to buy the game. As you may know, internet layouts have changed a lot since 2006 when it was made. I am looking for an all in one artist. I want a brand new login page, improved table appearance, smoother corners, richer appearance and such. Since i will be the owner and it has many players and donators i will be able to afford good improvements, just not all in one. I have done new backgrounds, bars look glossy now, but other than actual images i suck at web graphics. If you think you have what it takes, please ask some questions and post pictures of your work. If i like your work, i will keep you on tab as a long term graphic artist. Thanks all :) Remember, i need samples to pick from, im like a hobo in home depot lol.
  11. That might not always work, what if an item is supposed to bring it over 100%? Then it just shows 100%. Heres what i did:   PUT IT Above the code that prints out your bars, then edit the bars to use enperc2 as the width instead of enperc. This way it will print out the real percentage while keeping the bars down to 120 width. :) It works great for me.   $enperc2 = $enperc*1.2; if($enperc2>120) { $enperc2=120; } $enopp2 = $enopp*1.2; if($enopp2>120) { $enopp2=120; } $wiperc2 = $wiperc*1.2; if($wiperc2>120) { $wiperc2=120; } $wiopp2 = $wiopp*1.2; if($wiopp2>120) { $wiopp2=120; } $brperc2 = $brperc*1.2; if($brperc2>120) { $brperc2=120; } $bropp2 = $bropp*1.2; if($bropp2>120) { $bropp2=120; } $experc2 = $experc*1.2; if($experc2>120) { $experc2=120; } $exopp2 = $exopp*1.2; if($exopp2>120) { $exopp2=120; } $hpperc2 = $hpperc*1.2; if($hpperc2>120) { $hpperc2=120; } $hpopp2 = $hpopp*1.2; if($hpopp2>120) { $hpopp2=120; }
  12. Im going to be hiring someone real soon to fix this all. Im looking for someone who can do awesome graphic layouts to improve the standard MC tabled login page, improve tables, horizontal rules, css, fonts etc. I want it to look better and load quicker at the same time. I want someone i can trust. So with that being said, is scriptlance a good place to do this? As an owner with decent donations coming in i could probably afford $100 worth of updates at a time. Should i stick with MWG or should i use something like scriptlance and use someone who's never even heard of MCCode?
  13. I notice some mccode games load so fast you dont see the page move. Others, you click a link and it turns black and re-renders everything. What can be done to increase loading speed? I heard echo/print can make a difference. I also heard the use of <div> would help. Anyone know any good specifics that dont need a complete engine conversion just to implement?
  14. Im just saying! Using this on your variables instead of figuring out what cleaners to add to them will save a lot of work. Isnt this what your supposed to use to secure a site? I thought stripping tags and such were the best way to secure it, so why not let a function do it for you?
  15. Explain to me why it wont? This IS securing the whole site, isnt it? Im saying go through EVERY script, and add this function around EVERY SINGLE post/get. So really its the same thing as adding abs/strip tags to each one individually, except the function will do it for you. BTW thanks for the is_int! :D
×
×
  • Create New...