title: php: ip2long returning negative val
body: <pre><code>function ip_address_to_number($IPaddress) { 
       if(!$IPaddress) {
        return false;
       } else {
        $ips = split('\.',$IPaddress);
        return($ips[3] + $ips[2]*256 + $ips[1]*65536 + $ips[0]*16777216);
       }
  }
  </code></pre>
  
  <p>that function executes the same code as the php bundled function ip2long. however, when i print these 2 values, i get 2 different returns. why? (im using php 5.2.10 on a wamp environment).</p>
  
  <pre><code>ip2long('200.117.248.17'); //returns **-931792879**
  
  ip_address_to_number('200.117.248.17'); // returns **3363174417**
  </code></pre>
  
  <p>Applied and continued here:
  <a href="https://stackoverflow.com/questions/3063192/php-showing-my-country-based-on-my-ip-mysql-optimized">Showing my country based on my IP, mysql optimized</a></p>