Jump to content
MakeWebGames

galdikas

Members
  • Posts

    139
  • Joined

  • Last visited

Everything posted by galdikas

  1. galdikas

    Ip block

    Sorry, but i don't think my english is that bad... So there is no need to send me sites like that.... I have seen people whose native language is english to spell way worse than me...!
  2. galdikas

    Ip block

    I am not that good wit all the networking stuff. Is those dynamic IPs very common? Roughly what percentage of people will have them??? And to solve the big IPs table problem.. I have one Idea. it is liked bocked users table. Basivally if someone gets caught with IP block function. They ID pair will be entered into that table. So before performing that IP check, firstly that table be check to see if that pair is already caught by IP block. IF it returns no results, then IP check will be carried out. i am not sure if you understand what I mean... But cant think of better way to explain lol
  3. galdikas

    Ip block

    Hm.. Well yeah :) I mean you can use it,... But people will have to accept, that you cannot transfer anything between 2 accounts that ever logged in from same IP :) If game will be succesfull, there should be plenty of other people to do business with. If it won't be succesfull there will be no game lol
  4. galdikas

    Ip block

      Yeah but this block is easy to get around :) All you need to get around is to log in from new computer, and you will be able to send the other person. And my function checks all IP's of both users. So he can even log in with proxy, if they ever logged in from same IP.. That's it, they wont get around :)
  5. galdikas

    Ip block

    Ok.... I never enclose vars wit anything in querys... Well except if it is like array $something['something'].. And it works fine. Well it appears to work fine.. :) is there some security vulnerability or something I am unaware of?? In w3schools SQL tutorial (which I used to teach myself SQL) values was not enclosed in anything. But they weren't using variable but direct values///
  6. galdikas

    Ip block

    It does indeed work :) I was just looking for someone to give feedback on the code.. especially about that database query in the while loop.. Anyone got any data about how common is it that one single user will have more then lets say 10 different IPs? because it probably should not cayse to much lag, if there isnt many users with dynamic IPs :)
  7. Paragraph from readme.txt: Note: This mod has protection built into it. It will only work on the domain name you provided when you bought it. If you give it to other people, it will appear to work on their game, but there will be a few fatal functions that will wreak havoc. Moreover, using a special code on the game with the 'stolen' copy, I can retrieve the url of the person who bought that mod and gave it to someone else. So, in essence, if you give this mod away, not only will I know you did it, but it will not work for the people you gave it to. I hate having to do something like this, but it's become necessary for the McCode game engine. Let's just keep this simple: Don't give this mod away to others, it will only work on your domain. So maybe if you didnt buy the mod, and install it without paying it wont work... And that is why he released the source?? :P PS. Anyone has this installled? Would like to take a look amd try it out :)
  8. @Peter. I was thinking of having that. But this feature will have to be earned by accomplishing certain things :) @Curt. Only Bonds and Donator Passes will have their own markets :) All the rest will be universal market :)
  9. Well there is always be work arounds. But we have to do all we can to make them harder ;) No gangs in my game.. Not MCC, i code from scratch :) So I will try and think of different system. And I have a couple ideas to prevent the " E.g. “my listing is the follow 2010987” <- specific number makes trading easy even without a name. " .. . There will be player to player trading as well :)
  10. So I am now creating few markets. So traditionally it will be something like this: No. Seller name. Price each. Total. In my bonds market I have it like that. But in donator passes I have got rid of Seller name column. Why? Just to make any guys trying to illegally transfer items over markets harder (I still have IP blocks in place)... What do yous think about this? I mean not listing the sellers name in the market? Would this have any negative effects in game-play? I know its kind of a silly question.. It is just that in every game I have tried, in any player 2 player trading, you will always see who is selling the item. Seller would still get event notification that someone bought whatever he listed.
  11. galdikas

    Ip block

    Ok I am trying to come up with a function that would check if 2 users ever logged from the same IP. so i have table with all user logins, which as well contains all IPs. <?php function ip_block($_SESSION['userid'],$other_id) { $loggedinusersips=mysql_query("SELECT ip FROM userlogins WHERE userid='$_SESSION['userid']"); $i=0; if($i==0) { while($liup=mysql_fetch_assoc($loggedinusersips)) { $otherusersips=mysql_query("SELECT ip FROM userlogins WHERE userid='$other_id' AND ip='{$liup['ip']}'"); if(mysql_num_rows($otherusersips)>0) { $i++; } } } if($i==0) { $ip_block_passed=1; return $ip_block_passed; } else { $ip_block_passed=0; return $ip_block_passed; } } ?>   should this do??
  12. galdikas

    Timestamp

    I am not yet object oriented :P But this could be used with procedural as well?? Thanks for tip ;)
  13. http://www.w3schools.com/ This site will start you up! On a serious note, the amount of people that comes here gives a very abstract idea of what hey want and expects someone to do it, and that once it is done they will find millions in they're paypal account in couple of weeks. This doesn't happen.. EVER :)
  14. I was expecting to see some interface :D So what can you do with it?
  15. galdikas

    Timestamp

    Ok.. figured it out myself. Here is end function:   function date_diff($stamp) { $time = $stamp; if($time>=0 && $time<=59) { // Seconds $timeshift = $time.' seconds '; } elseif($time>=60 && $time<=3599) { // Minutes + Seconds $pmin = $time / 60; $premin = explode('.', $pmin); $presec = $pmin-$premin[0]; $sec = $presec*60; $timeshift = $premin[0].' min '.round($sec,0).' sec '; } elseif($time>=3600 && $time<=86399) { // Hours + Minutes $phour = $time / 3600; $prehour = explode('.',$phour); $premin = $phour-$prehour[0]; $min = explode('.',$premin*60); $presec = '0.'.$min[1]; $sec = $presec*60; $timeshift = $prehour[0].' hrs '.$min[0].' min '.round($sec,0).' sec '; } elseif($time>=86400) { // Days + Hours + Minutes $pday = $time / 86400; $preday = explode('.',$pday); $phour = $pday-$preday[0]; $prehour = explode('.',$phour*24); $premin = ($phour*24)-$prehour[0]; $min = explode('.',$premin*60); $presec = '0.'.$min[1]; $sec = $presec*60; $timeshift = $preday[0].' days '.$prehour[0].' hrs '.$min[0].' min '.round($sec,0).' sec '; } return $timeshift; }   Dont have time to explain more at the moment. But if anyone need more explanation, just post here, and will explain more how to use it :)
  16. galdikas

    Timestamp

    So i coded investment bank, and now I need to come up with a way to return remaining time. In the database I record a timestamp. Lets say for a week long investment I will say: $timespan=time()+604800; and then store it in database. So for converting it to some thing like: xx days xx hours xx minutes xx seconds of investment time remaining. I found this function:   function date_diff($start, $end="NOW") { $sdate = strtotime($start); $edate = strtotime($end); $time = $edate - $sdate; if($time>=0 && $time<=59) { // Seconds $timeshift = $time.' seconds '; } elseif($time>=60 && $time<=3599) { // Minutes + Seconds $pmin = ($edate - $sdate) / 60; $premin = explode('.', $pmin); $presec = $pmin-$premin[0]; $sec = $presec*60; $timeshift = $premin[0].' min '.round($sec,0).' sec '; } elseif($time>=3600 && $time<=86399) { // Hours + Minutes $phour = ($edate - $sdate) / 3600; $prehour = explode('.',$phour); $premin = $phour-$prehour[0]; $min = explode('.',$premin*60); $presec = '0.'.$min[1]; $sec = $presec*60; $timeshift = $prehour[0].' hrs '.$min[0].' min '.round($sec,0).' sec '; } elseif($time>=86400) { // Days + Hours + Minutes $pday = ($edate - $sdate) / 86400; $preday = explode('.',$pday); $phour = $pday-$preday[0]; $prehour = explode('.',$phour*24); $premin = ($phour*24)-$prehour[0]; $min = explode('.',$premin*60); $presec = '0.'.$min[1]; $sec = $presec*60; $timeshift = $preday[0].' days '.$prehour[0].' hrs '.$min[0].' min '.round($sec,0).' sec '; } return $timeshift; } Since i use it with time stamps, not with dates, i changed it a little:   //$time_from_db is $timespan=time()+604800; function date_diff(time(), $time_from_db) { //remove the strtotime(), since I use timestamps already. $sdate =$start; $edate =$end; $time = $edate - $sdate; if($time>=0 && $time<=59) { // Seconds $timeshift = $time.' seconds '; } elseif($time>=60 && $time<=3599) { // Minutes + Seconds $pmin = ($edate - $sdate) / 60; $premin = explode('.', $pmin); $presec = $pmin-$premin[0]; $sec = $presec*60; $timeshift = $premin[0].' min '.round($sec,0).' sec '; } elseif($time>=3600 && $time<=86399) { // Hours + Minutes $phour = ($edate - $sdate) / 3600; $prehour = explode('.',$phour); $premin = $phour-$prehour[0]; $min = explode('.',$premin*60); $presec = '0.'.$min[1]; $sec = $presec*60; $timeshift = $prehour[0].' hrs '.$min[0].' min '.round($sec,0).' sec '; } elseif($time>=86400) { // Days + Hours + Minutes $pday = ($edate - $sdate) / 86400; $preday = explode('.',$pday); $phour = $pday-$preday[0]; $prehour = explode('.',$phour*24); $premin = ($phour*24)-$prehour[0]; $min = explode('.',$premin*60); $presec = '0.'.$min[1]; $sec = $presec*60; $timeshift = $preday[0].' days '.$prehour[0].' hrs '.$min[0].' min '.round($sec,0).' sec '; } return $timeshift; }
  17. never mind... Found what was looking for! :)
  18. Thanks for detailed reply Bertrand. I should probably avail of that code checking service you offer (Well I remember post or article about it, but cannot find it anywhere anymore). Is it still available? Can you give me a link to that article, or give some info here?
  19. Yeah lol Even google "only" gives 7gigs for your email lol
  20. Ok.. I dont think this question is worth a new thread, so Ill stick it in here. So is there internal limits in MySQL that limits how much request per given time frame it can process? Or is it only limited by your hardware?? By the way.. Thanks for this tutorial! Really nice. First I read it about a month ago, and understand nothing lol Now I read it again, and it all makes perfect sense.. So i suppose good indicator that I am making good progress in PHP/SQL lol
  21. well... I personally cant tell for sure without seeing the rest of the code. But for higher success I would increase the WILL multiplier and decrease LEVEL divider... Just blind guess since I do not know which way does the outcome of this formula affects the outcome of the crime :)
  22. galdikas

    Crazy form lol

    Yeah, I bank just stores the length, rate, and timespan of investment :) So I need to select everything... And it is only 4 rows there, so not a major thing anywayy :) I found the problem.. It was as Dayo said... another form left open above :) Was half asleep yesterday :)
  23. galdikas

    Crazy form lol

    <form action='bank.php' method='post'> Amount to invest:<input type='text' name='investment' value='{$bi['money']}'/> For:<select name='period'>"; $ibank=mysql_query("SELECT * FROM ibank"); while($ib=mysql_fetch_assoc($ibank)) { echo"<option value='{$ib['id']}'>{$ib['name']}({$ib['rate']}%)</option>"; } echo"</select> <input type='submit' name='submit' value='Invest' /> </form> ok... Can anyone tell me why when I click Invest button, it redirects me to gym.php???? Form looks alright to me... There is no other code that would accept the form. But even without that code, should't it just refresh the same page???
  24. I see you point. But I still think you could of had option "I do not use MCcodes." Purely just to see how much of community dont use them :)     Well I am here for community as well, but I do not use MC. PS. I do not have anything against MCcodes, nor am I attempting to mock/flame them :) I think MCcodes is good thing, its just that I personally do not use them, just because I want to try an create game by myself :)
  25. Well my knowledge in this isn't very deep. But once I am going to start looking at these thing more, I am quite sure that I will be learning myself HTML5 and JS. So I have voted for that.
×
×
  • Create New...