Jump to content
MakeWebGames

Will

Members
  • Posts

    215
  • Joined

  • Last visited

    Never

Will's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Just wondering how many people are using Nginx, (or lighttpd for that matter) not apache? I've been using Nginx for a site I work for (http://www.citystruggle.com) and it's much faster, and has a smaller memory footprint; I've tested it up to 10,000 concurrent users :P The php is served through FastCgi, with mysql and memcached. I've been able to overcome no htaccess with some rewrites in the nginx.conf, however the syntax takes a while to get used to. Also I don't use vhost, that server only hosts the single site.
  2. Will

    Dectece user OS

    You have to be able to change the php.ini file
  3. Will

    Dectece user OS

    Just use the phpget_browser() function. You'll need to add the browscap file to your php.ini file though: Browscap file: http://browsers.garykeith.com/downloads.asp and in the php.ini file: browscap=browscap.ini Change the file name to the one your download.
  4. Re: IP Banning tool [V1] + [V2] I use: if (!empty($_SERVER['HTTP_X_FORWARDED_FOR']) && !empty($_SERVER['HTTP_CLIENT_IP']) && (preg_match('~^((0|10|172\.16|192\.168|255|127\.0)\.|unknown)~', $_SERVER['HTTP_CLIENT_IP']) == 0 || preg_match('~^((0|10|172\.16|192\.168|255|127\.0)\.|unknown)~', $_SERVER['REMOTE_ADDR']) != 0)) { if (strtok($_SERVER['HTTP_X_FORWARDED_FOR'], '.') != strtok($_SERVER['HTTP_CLIENT_IP'], '.') && '.' . strtok($_SERVER['HTTP_X_FORWARDED_FOR'], '.') == strrchr($_SERVER['HTTP_CLIENT_IP'], '.') && (preg_match('~^((0|10|172\.16|192\.168|255|127\.0)\.|unknown)~', $_SERVER['HTTP_X_FORWARDED_FOR']) == 0 || preg_match('~^((0|10|172\.16|192\.168|255|127\.0)\.|unknown)~', $_SERVER['REMOTE_ADDR']) != 0)) $_SERVER['REMOTE_ADDR'] = implode('.', array_reverse(explode('.', $_SERVER['HTTP_CLIENT_IP']))); else $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CLIENT_IP']; } if (!empty($_SERVER['HTTP_CLIENT_IP']) && (preg_match('~^((0|10|172\.16|192\.168|255|127\.0)\.|unknown)~', $_SERVER['HTTP_CLIENT_IP']) == 0 || preg_match('~^((0|10|172\.16|192\.168|255|127\.0)\.|unknown)~', $_SERVER['REMOTE_ADDR']) != 0)) { if (strtok($_SERVER['REMOTE_ADDR'], '.') != strtok($_SERVER['HTTP_CLIENT_IP'], '.')) $_SERVER['REMOTE_ADDR'] = implode('.', array_reverse(explode('.', $_SERVER['HTTP_CLIENT_IP']))); else $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CLIENT_IP']; } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',') !== false) { $ips = array_reverse(explode(', ', $_SERVER['HTTP_X_FORWARDED_FOR'])); foreach ($ips as $i => $ip) { if (preg_match('~^((0|10|172\.16|192\.168|255|127\.0)\.|unknown)~', $ip) != 0 && preg_match('~^((0|10|172\.16|192\.168|255|127\.0)\.|unknown)~', $_SERVER['REMOTE_ADDR']) == 0) continue; $_SERVER['REMOTE_ADDR'] = trim($ip); break; } } elseif (preg_match('~^((0|10|172\.16|192\.168|255|127\.0)\.|unknown)~', $_SERVER['HTTP_X_FORWARDED_FOR']) == 0 || preg_match('~^((0|10|172\.16|192\.168|255|127\.0)\.|unknown)~', $_SERVER['REMOTE_ADDR']) != 0) $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR']; } elseif (!isset($_SERVER['REMOTE_ADDR'])) { $_SERVER['REMOTE_ADDR'] = ''; } $ip=$_SERVER['REMOTE_ADDR'];   It's not mine, can't remeber where from. Effective Though.
  5. Re: Factorial Program in C++ - 1 Million Factorial   What's it for?
  6. Re: [mccode] Money,crystals cap   ... Stats are a decimal as well.....
  7. Re: [mccode] Password reset code   Then you already have it in there.
  8. Re: [mccode] Password reset code   I hoped by me saying you didn't read the instructions would prompt you to do so; I guess not. You didn't put the function in global_func.php or never included it. Re-read the instructions carefully.
  9. Re: [mccode] Password reset code   Yeah, You didn't read the instructions.
  10. Re: Money,crystals cap   err sorry dude but u are sadly mistaken as i have changed it from Decimal bigger then INT and oh yer it works fine so maybe ya shud think before you speak I did think. You clearly didn't as your sentence is incoherent and I can derive no meaning from it. Perhaps you should rephrase it?
  11. Will

    Php Image Table

    Re: Php Image Table Doesn't include the table module.
  12. Will

    Php Image Table

    Before I make one myself; I was wondering if anybody knows a free class to make a table as an image. I know Jpgraph do it in but only in their paid version but I'm looking for something free. Just to save myself the trouble; and before you ask there is a valid reason why it has to be an image. Thanks.
  13. Will

    PHP Form issue

    Re: PHP Form issue   The user can still edit it...
  14. Will

    PHP Form issue

    Re: PHP Form issue Why even bother with encryption? You can never trust an input from a user; as said just use a session.
  15. Will

    loop problem

    Re: loop problem Well in will only ever increase the level is the exp is less than 0: while($e < 0) { Mayby it should be > instead?
×
×
  • Create New...