Jump to content
MakeWebGames

KyleMassacre

Members
  • Posts

    2,921
  • Joined

  • Last visited

  • Days Won

    48

Everything posted by KyleMassacre

  1. You can try: $_POST["itmbuyprice"] = "string"; $itmbuy = ($_POST["itmbuyprice"] + 0 ? abs((int)$_POST["itmbuyprice"]) : 0); echo $itmbuy; Which returns 0 in this example as you can see here: http://codepad.org/nQjy0jfr
  2. 0 or Blank = empty and you can try this: $itmbuy = (isset($_POST['itmbuyable']) == 'on') ? 1 : 0; and see if that works. I'm mobile so I can't troubleshoot that well nope after some troubleshooting that won't fix the undefined index error, try this: if(isset($_POST["itmbuyable"])) { $itmbuy = $_POST['itmbuyable'] == 'on' ? 1 : 0; }
  3. My 25/15 has always served me well. The only reason I upgraded was because my contract was up and to keep me they gave me faster speed, more tv premium channels for a cheaper price :p. I think my company maxes @ 100/100 but 50/50 is fine with me
  4. They could atleast hook you up with a bit more upload. I'm getting my 50/50 today, currently I'm just running 25/15
  5. Hmm, never really attempted this before because I never had the need. But what I would attempt is to grab the index number of my name and store that number in a separate variable. So in your example you would be index 4 and say your incrementing your indexes like this for this example: $i++; so when your $i hits your unique id or name or whatever store in cache like $var = $i;. Now you want the 2 indexes before and after your $var marker and format it that way. you may find some help looking at Fizzbuzz
  6. Depending on what your using, I got (since I'm mobile) mt_rand being 300,000 ms faster running a few iterations in just a little for loop. Regardless of what you would use here I don't think it really matters as Guest stated. But what I would do for a module like this is store the next time the module should become available, give the players a little window like 2 hours and let the module do it's thing. You can use something like a string for the date so it's human readable or just a timestamp, and using getdate() may be pretty simple to manipulate visually in your code of what you want or use time() and do some fancy math like time()+ (2*60*60) to get 2 hours ahead or reverse to get 2 hours before and see if your current timestamp falls within your allowance.
  7. Try changing it to: $db->num_rows($objThisHour)
  8. Move your $i = $db->insert_id(); up a couple of lines and see if that works. The docs for it says that it grabs the id of the last query and there are 2 queries before calling that variable.
  9. Wow that is a pretty decent price for quality like that
  10. In all honesty, your layout is very offensive on the eyes. You need some styled tables to help people see the content on the screen
  11. Change it back and convert it over to the database class. I don't know much about MTG's mysqli wrapper to really help you out
  12. Well it should be using the database class if your using V2. So if your config file is set to use mysqli then just make sure that Cronus isn't using any mysql_* functions inside the code
  13. You should share some of your ideas as it may spark up some ideas for the person that may want to take this on
  14. That's pretty much how I would do it
  15. No, your not wrong but what it now does is allows someone to constantly rate a player up or down all day long nonstop. That's all I meant by my post
  16. That will remove the limit a player can rate people but it also removes the limit on how many time a player can rate the same player ;)
  17. http://pastebin.com/7tfTe0kJ thats a little bit better. Also you can use the user_dropdown function if you would like instead of putting in a users id
  18. KyleMassacre

    Exploits

    Validate/sanitize your get and post requests. No one is going to teach you how to exploit things just because you say it's for your own testing or your own game. You have to understand what each thing does. You write/modify your scripts so you HAVE to understand it. For example if your using a GET request like $_GET['action'], what is the action? Is it a number, a string, or what? Once you figure that out validate it and if your using the GET request to interact with your database then I would sanitize it. so try that out for starters and see where that gets ya
  19. Oops good looking out. I would edit it but I'm on my phone. Must have been some copy/paste errors
  20. If Chrome isn't supported then what browser is?
  21. Check this out
  22. Take a look at the GD library
×
×
  • Create New...