Jump to content
MakeWebGames

grant

Members
  • Posts

    207
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by grant

  1. does anyone no how to strip an ip from a proxy i have this code but not working function get_ip() { global $REMOTE_ADDR; global $HTTP_X_FORWARDED_FOR, $HTTP_X_FORWARDED, $HTTP_FORWARDED_FOR, $HTTP_FORWARDED; global $HTTP_VIA, $HTTP_X_COMING_FROM, $HTTP_COMING_FROM; global $HTTP_SERVER_VARS, $HTTP_ENV_VARS; // Get some server/environment variables values if(empty($REMOTE_ADDR)) { if(!empty($_SERVER)&&isset($_SERVER['REMOTE_ADDR'])) { $REMOTE_ADDR = $_SERVER['REMOTE_ADDR']; } elseif(!empty($_ENV)&&isset($_ENV['REMOTE_ADDR'])) { $REMOTE_ADDR = $_ENV['REMOTE_ADDR']; } elseif(!empty($HTTP_SERVER_VARS) && isset($HTTP_SERVER_VARS['REMOTE_ADDR'])) { $REMOTE_ADDR = $HTTP_SERVER_VARS['REMOTE_ADDR']; } elseif(!empty($HTTP_ENV_VARS)&&isset($HTTP_ENV_VARS['REMOTE_ADDR'])) { $REMOTE_ADDR = $HTTP_ENV_VARS['REMOTE_ADDR']; } elseif(@getenv('REMOTE_ADDR')) { $REMOTE_ADDR = getenv('REMOTE_ADDR'); } } // end if if(empty($HTTP_X_FORWARDED_FOR)) { if(!empty($_SERVER) && isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { $HTTP_X_FORWARDED_FOR = $_SERVER['HTTP_X_FORWARDED_FOR']; } elseif(!empty($_ENV) && isset($_ENV['HTTP_X_FORWARDED_FOR'])) { $HTTP_X_FORWARDED_FOR = $_ENV['HTTP_X_FORWARDED_FOR']; } elseif(!empty($HTTP_SERVER_VARS) && isset($HTTP_SERVER_VARS['HTTP_X_FORWARDED_FOR'])) { $HTTP_X_FORWARDED_FOR = $HTTP_SERVER_VARS['HTTP_X_FORWARDED_FOR']; } elseif(!empty($HTTP_ENV_VARS) && isset($HTTP_ENV_VARS['HTTP_X_FORWARDED_FOR'])) { $HTTP_X_FORWARDED_FOR = $HTTP_ENV_VARS['HTTP_X_FORWARDED_FOR']; } elseif(@getenv('HTTP_X_FORWARDED_FOR')) { $HTTP_X_FORWARDED_FOR = getenv('HTTP_X_FORWARDED_FOR'); } } // end if if(empty($HTTP_X_FORWARDED)) { if(!empty($_SERVER) && isset($_SERVER['HTTP_X_FORWARDED'])) { $HTTP_X_FORWARDED = $_SERVER['HTTP_X_FORWARDED']; } elseif(!empty($_ENV) && isset($_ENV['HTTP_X_FORWARDED'])) { $HTTP_X_FORWARDED = $_ENV['HTTP_X_FORWARDED']; } elseif(!empty($HTTP_SERVER_VARS) && isset($HTTP_SERVER_VARS['HTTP_X_FORWARDED'])) { $HTTP_X_FORWARDED = $HTTP_SERVER_VARS['HTTP_X_FORWARDED']; } elseif(!empty($HTTP_ENV_VARS) && isset($HTTP_ENV_VARS['HTTP_X_FORWARDED'])) { $HTTP_X_FORWARDED = $HTTP_ENV_VARS['HTTP_X_FORWARDED']; } elseif(@getenv('HTTP_X_FORWARDED')) { $HTTP_X_FORWARDED = getenv('HTTP_X_FORWARDED'); } } // end if if(empty($HTTP_FORWARDED_FOR)) { if(!empty($_SERVER) && isset($_SERVER['HTTP_FORWARDED_FOR'])) { $HTTP_FORWARDED_FOR = $_SERVER['HTTP_FORWARDED_FOR']; } elseif(!empty($_ENV) && isset($_ENV['HTTP_FORWARDED_FOR'])) { $HTTP_FORWARDED_FOR = $_ENV['HTTP_FORWARDED_FOR']; } elseif(!empty($HTTP_SERVER_VARS) && isset($HTTP_SERVER_VARS['HTTP_FORWARDED_FOR'])) { $HTTP_FORWARDED_FOR = $HTTP_SERVER_VARS['HTTP_FORWARDED_FOR']; } elseif(!empty($HTTP_ENV_VARS) && isset($HTTP_ENV_VARS['HTTP_FORWARDED_FOR'])) { $HTTP_FORWARDED_FOR = $HTTP_ENV_VARS['HTTP_FORWARDED_FOR']; } elseif(@getenv('HTTP_FORWARDED_FOR')) { $HTTP_FORWARDED_FOR = getenv('HTTP_FORWARDED_FOR'); } } // end if if(empty($HTTP_FORWARDED)) { if(!empty($_SERVER) && isset($_SERVER['HTTP_FORWARDED'])) { $HTTP_FORWARDED = $_SERVER['HTTP_FORWARDED']; } elseif(!empty($_ENV) && isset($_ENV['HTTP_FORWARDED'])) { $HTTP_FORWARDED = $_ENV['HTTP_FORWARDED']; } elseif(!empty($HTTP_SERVER_VARS) && isset($HTTP_SERVER_VARS['HTTP_FORWARDED'])) { $HTTP_FORWARDED = $HTTP_SERVER_VARS['HTTP_FORWARDED']; } elseif(!empty($HTTP_ENV_VARS) && isset($HTTP_ENV_VARS['HTTP_FORWARDED'])) { $HTTP_FORWARDED = $HTTP_ENV_VARS['HTTP_FORWARDED']; } elseif(@getenv('HTTP_FORWARDED')) { $HTTP_FORWARDED = getenv('HTTP_FORWARDED'); } } // end if if(empty($HTTP_VIA)) { if(!empty($_SERVER) && isset($_SERVER['HTTP_VIA'])) { $HTTP_VIA = $_SERVER['HTTP_VIA']; } elseif(!empty($_ENV) && isset($_ENV['HTTP_VIA'])) { $HTTP_VIA = $_ENV['HTTP_VIA']; } elseif(!empty($HTTP_SERVER_VARS) && isset($HTTP_SERVER_VARS['HTTP_VIA'])) { $HTTP_VIA = $HTTP_SERVER_VARS['HTTP_VIA']; } elseif(!empty($HTTP_ENV_VARS) && isset($HTTP_ENV_VARS['HTTP_VIA'])) { $HTTP_VIA = $HTTP_ENV_VARS['HTTP_VIA']; } elseif(@getenv('HTTP_VIA')) { $HTTP_VIA = getenv('HTTP_VIA'); } } // end if if(empty($HTTP_X_COMING_FROM)) { if(!empty($_SERVER) && isset($_SERVER['HTTP_X_COMING_FROM'])) { $HTTP_X_COMING_FROM = $_SERVER['HTTP_X_COMING_FROM']; } elseif(!empty($_ENV) && isset($_ENV['HTTP_X_COMING_FROM'])) { $HTTP_X_COMING_FROM = $_ENV['HTTP_X_COMING_FROM']; } elseif(!empty($HTTP_SERVER_VARS) && isset($HTTP_SERVER_VARS['HTTP_X_COMING_FROM'])) { $HTTP_X_COMING_FROM = $HTTP_SERVER_VARS['HTTP_X_COMING_FROM']; } elseif(!empty($HTTP_ENV_VARS) && isset($HTTP_ENV_VARS['HTTP_X_COMING_FROM'])) { $HTTP_X_COMING_FROM = $HTTP_ENV_VARS['HTTP_X_COMING_FROM']; } elseif(@getenv('HTTP_X_COMING_FROM')) { $HTTP_X_COMING_FROM = getenv('HTTP_X_COMING_FROM'); } } // end if if(empty($HTTP_COMING_FROM)) { if(!empty($_SERVER) && isset($_SERVER['HTTP_COMING_FROM'])) { $HTTP_COMING_FROM = $_SERVER['HTTP_COMING_FROM']; } elseif(!empty($_ENV) && isset($_ENV['HTTP_COMING_FROM'])) { $HTTP_COMING_FROM = $_ENV['HTTP_COMING_FROM']; } elseif(!empty($HTTP_COMING_FROM) && isset($HTTP_SERVER_VARS['HTTP_COMING_FROM'])) { $HTTP_COMING_FROM = $HTTP_SERVER_VARS['HTTP_COMING_FROM']; } elseif(!empty($HTTP_ENV_VARS) && isset($HTTP_ENV_VARS['HTTP_COMING_FROM'])) { $HTTP_COMING_FROM = $HTTP_ENV_VARS['HTTP_COMING_FROM']; } elseif(@getenv('HTTP_COMING_FROM')) { $HTTP_COMING_FROM = getenv('HTTP_COMING_FROM'); } } // end if // Gets the default ip sent by the user if(!empty($REMOTE_ADDR)) { $direct_ip = $REMOTE_ADDR; } // Gets the proxy ip sent by the user $proxy_ip=''; if(!empty($HTTP_X_FORWARDED_FOR))$proxy_ip = $HTTP_X_FORWARDED_FOR; elseif(!empty($HTTP_X_FORWARDED))$proxy_ip = $HTTP_X_FORWARDED; elseif(!empty($HTTP_FORWARDED_FOR))$proxy_ip = $HTTP_FORWARDED_FOR; elseif(!empty($HTTP_FORWARDED))$proxy_ip = $HTTP_FORWARDED; elseif(!empty($HTTP_VIA))$proxy_ip = $HTTP_VIA; elseif(!empty($HTTP_X_COMING_FROM))$proxy_ip = $HTTP_X_COMING_FROM; elseif(!empty($HTTP_COMING_FROM))$proxy_ip = $HTTP_COMING_FROM; // Returns the true IP if it has been found, else FALSE if (empty($proxy_ip)) { // True IP without proxy return $direct_ip; } else { $is_ip = ereg('^([0-9]{1,3}\.){3,3}[0-9]{1,3}', $proxy_ip, $regs); if($is_ip && (count($regs) > 0)) { // True IP behind a proxy return $regs[0]; } else { // Can't define IP: there is a proxy but we don't have // information about the true IP return FALSE; } } // end if... else... } anytime i go on a proxy it just the proxy ip it shows no my ip
  2. grant

    gang contest

    wrong is my code and i did make make it every mod i ever post someone has some **** to say well wont post any more mods on here as i says just ban my account [quote name=Given location and time of year, it is probably safe to assume we have a drunk loose on the boards. A temp ban should suffice until around the 10th of January when the standard Scottish hangover from the new year party has ended =D [/quote] wrong not been drinking just the forum you post screen shots but dont no what it does look at the screen shot you will see wot it does wot info do you need to to see how a contest woks ? erm its a contest mean your work there way to the top to be number one to win a prize well cba with the forum
  3. ok selling gang contest for $3 screen shots http://prntscr.com/4vu2m http://prntscr.com/4vu5i http://prntscr.com/4vu5u http://prntscr.com/4vu65 http://prntscr.com/4vu6i
  4. yip i agree with paul and danny make sure you get some info on who is doing it check up on there post and stuff see how much work they have done
  5. not help wot ever way i put the code try 4 ways not helped one bit is there any other way to to grab the time without useing that $time(); ????? and thanks for the help
  6. i try it but may need to change my game time timestamp to stop it from lagging as its pissing me off i have removed the code to see if it helps and the games not lagging any more so i just going to have to use some other way to get the users to show online and 24 list and i think the code not working to well going in to the db is there any way to make a 2 part table in the db for users to split the users in to 2 tables ?
  7. i have 734 user but only lags when there are more than 30 - 40 users online and my warriorusers are ok not sure wot you mean better coded ?
  8. ok as you no grpg has it own time updater for who online and stuff but mite is giving me slow queries witch is slowing my site down lags really bad when there is about 30 - 40 users on at one time # Thu Dec 22 16:02:56 2011 # Query_time: 7.208091 Lock_time: 0.000047 Rows_sent: 0 Rows_examined: 1 use warror_wart; UPDATE `warriorusers` SET `lastactive` = '1324594969' WHERE `id`='733' # Thu Dec 22 16:09:36 2011 # Query_time: 3.630811 Lock_time: 0.000060 Rows_sent: 0 Rows_examined: 1 use warror_wart; UPDATE `warriorusers` SET `lastactive` = '1324595372' WHERE `id`='186' here is the code am using any help would be great thanks   i have this in my header usertime($user_class->id, time());   this is in my classes function usertime($user, $time){ $resultaf = mysql_query("SELECT * FROM `warriorusers` WHERE `id`='$user'"); $worked = mysql_fetch_array($resultaf); $itemexist = mysql_num_rows($resultaf); if($itemexist == 0){ } else { $resultbb = mysql_query("UPDATE `warriorusers` SET `lastactive` = '$time' WHERE `id`='$user'"); } }
  9. was thinking to put it as a free mod http://prntscr.com/4ov6m http://prntscr.com/4ov85 will post more updated about how its going with this mod
  10. Securing help with mods and any other stuff you will be wanting done
  11. any one who needs help etc with grpg script please mail me wont work on big projects but small stuff is ok as i have my own game to run to or need help with any stuff try my best to help
  12. grant

    missions

    check out http://www.mafia-warriors.com mail id 1 al boost your level to 50 to try it out and you can leave feed back
  13. grant

    missions

    selliing my missions script for grpg or swap for black jack in the mission you need to get over the current awards to get the mission complete here is screen shots of it working also gives awards if you do the mission but if you fail you walk away with 0 comes with 1 missions.php 3 sql and updates to classes selling for $30 http://prntscr.com/4k88a .......screen 1 http://prntscr.com/4k8dz .......screen 2 http://prntscr.com/4k8gx .......screen 3 http://prntscr.com/4k8id ......screen 4 http://prntscr.com/4k8t8 ..... screen 5
  14. grant

    Mail System

    just recoded the GRPG mail system Preview here : http://www.mafia-warriors.com mail box has smileys send mail inbox save mail block mail box is safe from hack and no other user can read the mails will add mail bomb if ask will be a extra $5 will swap for a good grpg mod or will sell it for $20 add me on [email protected] or contact me on the game id :1 Bounty
  15. Djkanna your the man coded it in my game less than one hour with that code thanks for the post users are happy with the new names
  16. grant

    Crons

    $newbank = ceil($updates_user->bank + ($updates_user->bank * $interest)); if($updates_user->job != 0){ $result_job = mysql_query("SELECT * FROM `jobs` WHERE `id`='".$updates_user->job."'"); $worked_job = mysql_fetch_array($result_job); $newmoney = $newmoney + $worked_job['money']; Send_Event($updates_user->id, "<font color = 'yellow'>You earned</font><font color = '#ffffff'> $".$worked_job['money']."</font> <font color = 'yellow'>from your Rollover. You now have </font> $".$newmoney); }   right i see try that^^ have you got the cron set up in the tabs ?
  17. grant

    Crons

    well its not going to work the way you have it how can you get an id from the job ?????? $result_job = mysql_query("SELECT * FROM `jobs` WHERE `id`='".$updates_user->job."'"); `id`='$updates_user->job' not going to work how can you get an id from jobs ??????
  18. grant

    Crons

    line 67 $result_job = mysql_query("SELECT * FROM `jobs` WHERE `id`='".$updates_user->job."'"); replace '".$updates_user->job."' with '".$updates_user->id."' and that will fix that issues
  19. post the first 15 lines of header and we may be able find out wots wrong with it
  20. well other users on MWG mite no be able to make it
  21. keyboard typo
  22. oppz sorry bro fot you where taking the piss out of the game and have unbanned you
  23. sorry about that forgot the dash
  24. thanks small but nice mod no see it any other game i must be the first tae make it
  25. well i have made A random color mod this mod will change your name color random when a users click on you name   demo At http://www.mafia-warriors.net $3 only selling 10 copys
×
×
  • Create New...