Jump to content

Monkuar

Members
  • Posts

    987
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Monkuar

  1. Okay, I have around 5 swords, 5 helmets, 5 boots, 2 sprite human characters. problem is.. I Get the hash for each image with crc32 right? To store in my database for easy validation My Canvas script lets users add items onto their main sprite character. So what if user adds a sword, helmet a boot onto the main character, now javascript converts this image on the fly to base64, how would I go about validating that hash with all the hashes I have currently for my items that are stored in a database? (Server side) There is no way In hell I am going to add a image onto each sprite canvas, get the hash and store them.... what IfI make 2000 more helmet image items? It would take forever. (And 200 boots) it would take ages to add 1 for each one............. There has to be a way to to check if the merged hashes contain the respectful hashes that are for each image... I hope?
  2. $fname = "./img/nrpg/swords/sword2.png"; $hash = hash_file( 'crc32', $fname ); echo "crc32 = $hash\n"; looks liek this shows: b4e0499e i can just put a row in the items_Table called "crc32" and check if that exists to this, if not error that user out for trying to be nawty! OK awesome, this is alot shorter code! now i just need to find a javascript function to use this same algorithm Thanks xyph solved!!
  3. i dont check in javascript, it all needs to be serverside. the id's are passed by javascript, but that's the only way, same for the base64 data, again that's the only way for this certain project i am trying this right now: if ($_POST['data'] == "iVBORw0KGgoAAAANSUhEUgAAAFUAAABtCAYAAADQ3C2aAAAgAElEQVR4nO2dd2BT5ff%2Fr%2FpxoDIK3W3apE2b1STNapK22U3StE3SNk2b7j3ooJS2dEAhZa8ChVI2CIggUEUQEFFBBREUEWUpONgKypLdJO%2FfH379%2FPj40Y%2BoTOH1d55z3uf03vvce57zPCWIRzziEY94xCMe8YhHPOIRtwW7kvjX7AYpe9uMNNF6u6GXnSAev9eaHmQeW2FXPv%2FJdJNw20TDykPzbHs3jjfN6eyvGLR%2BZGLwvRb3QLK4TvfcO6MM44%2FMTT56ZkEmzsyx4a1WAypUVDSZBJ8saNbz77XGB47NdqX37lbdoQuT4nFkciL2Dtdi93ADJqXykRRORny43yZ7nvKZe63zgeLNSp7vrgbZEcxPwU8vZuDoVBN2NRsx0sxHmYYLA5d0YWJ1LOde63yg2FYX6fn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1PwbaMam8oVaNYxEOHrBkmg%2B5aYMH8l8TcPOPhhevKHWFOG7mU52Nkcf26IIjjpj0c9gHy3OFvseL30ONYVAKsLcWq0GXNSRRio4iKN43dGFtSnTeDb8y%2Ff9r8wW0A8%2Bd28tM%2BxrhToyseR8WbXEANr%2FO2I4b7iyDg969Ii2%2BfO96qA3Y24vjQXc7KjYRGGOLR031eMbG%2FD7fK1eaCEfGlF7nG8XQqsLcXlhZlYkC3%2B0Cr173u7fNwXYFFVqfOVQif2N%2BDyG9WYnSNBAi%2Fo7Zgwn2Qx9fbuFDlgV0c6Fqb%2FgLf7w%2FV%2BFfBqAfYNib9SKgz8Z61VHarX6i62J53fPy4eDdqQT3mkPgUi8p%2Brmd4qx0ZmhJweHn%2BmuysX2DkQWF2AC5NS0JEs3BlL70O%2BEz7vCVVU4ulaoXdKIqlfntKvxx3dEm63E49P0AWnHRhtPImPBsD1ehEujbHglUypK4Pv33GrC4qP%2BA1GaEJtN9b3B9bk4fIII9anCZAfQXEUR1Oy77W2B5YqKvXpz2akvop3y4GFWdhSKIaVS4KO5XN3D6b9p7GkRko9uab04NGF2ehM4aA8mvp1pjTo3p%2Fz96Azv0lrWmI3nZtTIN03xsB%2BOKpVdxq7nfXU%2BIGaxPY0Tti91vKIRzziEY%2F43%2Fw%2F4r7uZO3OfpkAAAAASUVORK5CYII%3D"){ echo "hey"; exit; }else{ echo "nope.."; exit; } which does not work at all... and i roughly have no idea i will be trying your hash method, any more details about the hash? So pretty much create a hash code to be checked with for each image instead of trying to check it like I did above?
  4. Let's say users can create their own avatar with different items... I have to so it will check against each item that was used on the HTML 5 canvas serverside. So if user trys to use item with the id of 20 and uses it to make his avatar, it will result in an error. The problem is, I need to check the items that I have already for them to chose from, and check to make sure the .png image code (data:image/png;base64) is the correct one. Reason why, is because I don't want people making a new data:image/png;base64 code from a .png file and using tamper data. Anyone to secure and loop through, check the data:image/png;base64's data to make sure it's correct? I think I can pull each item's png data:image/png;base64 with javascript, but how the hell do I check it? Do I need to make a new table with all the png data:image/png;base64 info in there and just use that to check it or what? Wouldn't the string be way to long to use "==" operator? it's like a 10kb png file, so it's very long.
  5. if it's null it re-literates and counts it as a foreach, f my life, fixed it my self lol stupid me, thanks all
  6. Okay, so my json data is: {"items":[null,{"id":"2","type":"m"},{"id":"1","type":"m"}]} $data = json_decode($_POST['itemid']); var_dump($data); foreach ($data as $name => $value) { foreach ($value as $entry) { $items[] = $entry->id; } } echo 'Here is a list of item id\'s sir!: <br><br> '.implode(",", $items).' </b>'; But for some odd reason it is showing: ,2,1 instead of just 2,1 is it because it's under 2 for eaches? I tried to remove the first foreach, but get stuck... anyone wanna help? Thanks in advance
  7. welcome hun
  8. {$indexed} please shoot me sorry
  9. echo <<<L <a href='$indexedhelp.php?view=39'>hello</a> L; I need it to be like this: echo <<<L <a href='$indexedhelp.php?view=39'>hello</a> L; I want to use $indexed as a variable, but it actually joins with the word help, how do I fix? I want only indexed to be the variable, Thanks!!
  10. WOW!! NO QUOTES!! LOL AND SUBSTRING_INDEX(last_post, '|', 1) >= 1 THANK YOU!! Marked as resolved! Love how the help document doesn't say anything about that, stupid site !
  11. Hmm.. so how can I get the value of my last_post column to get SUBSTRINGED? So If it's finding the literal "last_post" that's not good, lol. I need it to explode through my last_post column I'm assuming. http://dev.mysql.com/doc/refman/5.5/en/string-functions.html#function_substring this one seems like it would work but no delimiter? Also, I closed them with " quotes, still no results but no errors? So weird
  12. Code: WHERE num_posts > 20 AND SUBSTRING_INDEX('last_post', '|', 1) > 1 IM trying to select my first explode in my last_post column. last_post value = 1342545240|614|11890|Find The Religion Forums So... I am trying to select where num_posts >20 AND last_post > 1343622791 The query shows no errors, but no results. Please help, Thanks "1343622791" will stand for whatever timestamp I want to be queried by. 1343622791 Is just an example.
  13. I recently found this little script to help people making topics or posts with "WWWWWWWWWWWWWWWWWWWWWWWWWWWWW" OR "XX LETER HERE XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" Here it is: function FindInstances($inputString) { $enter = 0; $data = strtolower ($inputString); foreach (count_chars ($data, 1) as $i => $val) { if ($enter == 1) { $enter = 0; continue; } if (chr ($i) == "\n") { //echo "There are $val instance(s) of \" Enter \" in the string.\n"; $enter = 1; } else { //echo " There are $val instance(s) of \"" , chr ($i) , "\" in the string.\n"; $cletter =''.chr($i).''; if ($cletter == 'w' AND $val >= 5){ message("You cannot have 5 W's in your member title..."); }if ($cletter == 'o' AND $val >= 5){ message("You cannot have 5 o's in your member title..."); }if ($cletter == 'q' AND $val >= 5){ message("You cannot have 5 o's in your member title..."); }if ($cletter == 'm' AND $val >= 5){ message("You cannot have 5 o's in your member title..."); }if ($cletter == 'g' AND $val >= 5){ message("You cannot have 5 o's in your member title..."); }if ($cletter == 'c' AND $val >= 5){ message("You cannot have 5 o's in your member title..."); } } } } anyone know how to short this baby down so it works for all letters of the alphabet?
  14. Thanks all, was just using the friends system as an example. I actually use xyph's method on my forum. I was just thinking, let's say a user want's to block people from viewing his topic. This user needs to click on a link to block such a user, such will indeed add that user's id to a column. Joe = 23 Nick = 52 Rascal = 29 Joe made a topic, wants to block nick and rascal from viewing, their id's are 52,29 respectfully. Joe blocks nick by adding the 52 to the "block" column. Now Joe want's to block rascal with the id of 29? I need to add 29 into the "block" column. That's easy, the problem is........... the block column now has "52,29" in it. Now Joe want's to remove Nick from the blocked column. (Wants to remove 52 id) how do I do that dynamically? Creating a whole other table for this, would be a scapegoat out of performance, their has to be a similar way by just using 1 column with a dynamical id array. Then again, this would be a bitch to check if that id was already inserted.... Would have to explode/foreach the column id's like a bitch too.. Hmmm maybe the whole table idea is the best way.
  15. Okay, my brain is dumbfounded right now. Let's say I want to store these id's in a array in a row in my db. (Row name is "lol") lol current value = "5,2,1" now, let's say these are the id's of a user's friend list. The user wants to add a new friend, their user id is "23" How do I add "23" into the lol value "5,2,1" dynamically? I know one way is to select the lol column data and just add a ",$data" but that is not dynamic and what if the user want's to delete the user id "23" after they added that user as a friend? Thank you edit: 600th Post on the spot baby!
  16. it was my fault, i apologize.. i was looking through the records in descending order and found like 10 7 6 5 4 1 so it does seem like I did delete some, (no idea why it was my fault)
  17. Since I did delete 25 id's i'll just use $result = $db->query('SELECT COUNT(id) FROM '.$db->prefix.'users') or error('Unable to fetch total user count', __FILE__, __LINE__, $db->error()); $stats['total_users'] = $db->result($result); $newstats= $stats['total_users']+25; topic solved, lol thanks all
  18. i have 207 ROWS................... i count them, I have legimately 207 ROWS of id's but the cardinality is showing 187.............. there is something wrong here, how do I change the 187 to 207 to match how many id's I have in my table that's all I am asking
  19. thanks for the code but something tells me that would hurt performance once my member's is in the thousands lol im just looking to fix it through mysql first then keep using $result = $db->query('SELECT COUNT(id) FROM '.$db->prefix.'users') or error('Unable to fetch total user count', __FILE__, __LINE__, $db->error()); whenever thanks tho aha i just know it doesn't match with my 207 id's in my table so theres something wrong, and i am looking on a way to fix it through mysql i don't want to run 3 extra queries man
  20. Most likely... somewhere down the road Is there any hope to restore the index primary a couple values? :'( :'( :'( :'(
  21. Not be a noob but this is getting ridiculous and pissing me off.. I have this as my indexes PRIMARY BTREE Yes No id 182 A users_username_idx BTREE Yes No username (25) 182 A users_registered_idx BTREE No No registered 182 A Cardinality for my PRIMARY (ID IS STUCK AT 182) but my TABLE HAS 207 RECORDS, I need to update the 182 to 207 how? Why? because whenever I run this query $result = $db->query('SELECT COUNT(id) FROM '.$db->prefix.'users') or error('Unable to fetch total user count', __FILE__, __LINE__, $db->error()); $stats['total_users'] = $db->result($result); It sucks and shows me 182, not the real "207" id's in my users table, this is really pissing me off. Hell I even deleted it and re made one, still shows 182? Damn I am lost
  22. Long story short, this is part of myblack jack game when dealing cards $rand1 = rand(1, 11); $rand2 = rand(1, 10); Max of 21, okay so.... I need a function or something to exclude that number. Let's say user got 5 from $rand2. Now I need to make the $rand2 have a smaller percentage chance to spit out a 5 again. (I can use that a global variable, everything is in a database and serverside) Okay now a user get's 5 again from $rand2, I need to decrease the likelyhood of drawing a 5 again. Okay now the user hit's all 5 4 CARDS, now I need to make $rand2 variable exclude the number 5 because the guy already had 4 cards of 5, possible?
  23. Here is my query: $db->query("SELECT cache.*,u.username from search_cache cache LEFT Join users as u ON u.id = 'NEED HELP HERE' where ident = '{$username}' ORDER BY DATE DESC") or error('Unable to send the message.', __FILE__, __LINE__, $db->error()); Here is my data inside my search_cache Here is my while loop: while($recent = $db->fetch_assoc($rec)){ $data = unserialize($recent['search_data']); } Now I can use $data['search_type'] as a array and If I use echo $data['search_type']['2'] it echo's out the user_id 32 as seen in the screenshot at the very end. Problem is, I want to use that 'NEED HELP HERE' to join with that id 32 dynamically, how the hell is that possible with mysql or is it? Or would it be easier to just add a new row/column named user_id and just join of that instead of trying to do all this? would that be faster?
  24. Okay, Topic Solved, This was awesome, I actually learned some regex here
  25. OKay, problem $input = '1,2,3,4,5,6,2'; if (!preg_match('/^\d+(,{1}\d)*$/', $input)) { echo 'invalid input'; } Works, but let's say a number that is 2integers long or higher? $input = '1,2,3,4,5,6,2521,231'; if (!preg_match('/^\d+(,{1}\d)*$/', $input)) { echo 'invalid input'; } I changed if (!preg_match('/^\d+(,{1}\d)*$/', $input)) { to if (!preg_match('/^\d+(,{4}\d)*$/', $input)) { Because 2521 is 4 numbers long, but it still doesn't work am I missing something here? Doesn't {} represent how long the integer can be?
×
×
  • 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.