hi, the ip u r demanding is available at the following location's table... http://www.ip2location.com/free.asp there might be some data missing in the database that u r using... just check, Gaurav rustogi --- Prasanth <prassunair@xxxxxxxxx> wrote: > Hai all, > > This is the one of the best method to find the > location(country) using ip . > > Link of the DB is > > http://www.triquitips.com/mysql_tables/ip_to_country_resolver.php > > From that DB we can locate almost all IP's .But my > problem is that I cant locate one of the ip that > starting from 61.17.... > > I am also giving one of the row from my IP table. > > start_ip end_ip real_start_ip > real_end_ip short_nation long_nation > > 61.16.128.0 61.17.127.255 1024491520 > 1024557055 IN India > > > But that particular IP (I mean 61.17....) is not > in the list. > My doubte is that how this particular IP is > missing from my IP table, > How can I solve this problem????? > > <?php > $ip = $REMOTE_ADDR; // Get visitor's ip address > $connection = mysql_connect('localhost','root') or > die ("ERROR"); > $db= mysql_select_db('cdcol',$connection) or die > ("ERROR"); > $fact = explode(".",$ip); // create an array with > the ip numbers > echo $ip_code = $fact[3] + $fact[2]*256 + $fact[1] * > 65536 + $fact[0] * 16777216; // calculate the base > 10 ip > // now I execute a query to select a ip range that > fits with my visitor's ip > $sql = "select * from world_ip where $ip_code <= > real_end_ip and $ip_code >= real_start_ip"; > $result = mysql_query($sql,$connection) or die > ("ERROR in $sql"); > $row = mysql_fetch_array($result); > echo $row[long_nation]; > ?> > regards, > > Prasanth G > www.tech2sol.com > > > --------------------------------- > Yahoo! Mail > Bring photos to life! New PhotoMail makes sharing a > breeze. > > [Non-text portions of this message have been > removed] > > > > PHP Data object relational mapping generator > http://www.metastorage.net/ > Yahoo! Groups Links > > > php-objects-unsubscribe@xxxxxxxxxxxxxxx > > > > > > ___________________________________________________________ Yahoo! Photos ? NEW, now offering a quality print service from just 8p a photo http://uk.photos.yahoo.com PHP Data object relational mapping generator http://www.metastorage.net/ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-objects/ <*> To unsubscribe from this group, send an email to: php-objects-unsubscribe@xxxxxxxxxxxxxxx <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/