• 27-07-2006, 09:36:01
    #1
    Siteye Türkiye haricinde bir başka ülkeden giriş yapıldığında sitenin ingilizce sayfalarının açılması için bir scripte ihtiyacım var. Şimdiden teşekkürler.
  • 27-07-2006, 10:57:49
    #2
    IP-to-Country.com | 'Cause every I.P has a Home...
    bu adresten hep ip listesini hemde çeşit çeşit scriptleri bulabilirsin
  • 27-07-2006, 10:59:53
    #3
    <?
    
        //---------------------------------------------------
        // Sample code to display Visitor Country information 
        // PHP 4 
        //---------------------------------------------------
    
    
        // Establishing a database connection
        $dbh=mysql_connect("localhost:3306","$MYSQL_USERNAME","$MYSQL_PASSWORD");
        mysql_select_db("$MYSQL_DBNAME");
    
    
        // Query for getting visitor countrycode
        $country_query  = "SELECT country_code2,country_name FROM iptoc ".
             "WHERE IP_FROM<=inet_aton('$REMOTE_ADDR') ".
              "AND IP_TO>=inet_aton('$REMOTE_ADDR') ";
    
    
        // Executing above query
        $country_exec = mysql_query($country_query);
    
    
        // Fetching the record set into an array
        $ccode_array=mysql_fetch_array($country_exec);
    
    
        // getting the country code from the array
        $country_code=$ccode_array['country_code2'];
    
    
        // getting the country name from the array
        $country_name=$ccode_array['country_name'];
    
    
       // Display the Visitor coountry information
       echo "$country_code - $country_name";
    
    
       // Closing the database connection
       mysql_close($dbh);
    
    
    ?>
    işte bir tane
  • 27-07-2006, 12:08:07
    #4
    teşekkürler