Archive

Archive for April, 2010

Get IP And Location using PHP

April 22nd, 2010

<?php

$ip=$_SERVER['REMOTE_ADDR'];

echo “<font face=’Verdana’ size=’3′><b>IP Address= $ip</b>”;

$url = “http://www.ipmango.com/api.php?ip=”.$ip; $xml = simplexml_load_file($url);

echo “City : {$xml->city} <br />”;

echo “Region : {$xml->region} <br />”;

echo “Country Name : {$xml->countryname} <br />”;

echo “Latitude : {$xml->latitude} <br />”;

echo “Longitude : {$xml->longitude} <br />”;

?>

Refer: http://www.shefeekj.com/get-ip-and-location-using-php.html

Author: garima Categories: PHP Tags:

Steps for Drupal Multi-language website

April 13th, 2010
Steps for Drupal Multi-language website:

*  Login as administrator.

*  Go to Administer > Site Building > Modules (/admin/build/modules)

* Enable Locale & Content Translation modules (under Core Optional Group)

*  Go to Administer > Site Configuration > Languages (admin/settings/language)

* Click on add language tab

* From the drop down of languages, select Marathi & click on Add language button

* On the Languages list page, you will now see mr (Marathi) as a language, enable it & make it default

*  Download drupal translater and install it. (for installation, you need to upload translations directories of openid, system modules and profile related file in drupal default profile directory).

* Go to Administer > Site Building >Translate Interface (admin/build/translate)

* Click on Search Tab (admin/build/translate/search)

* Enter the string / text you wish to translate to Marathi (e.g. Log in)

* If the string is found, a list of all the places where this string is used in Drupal site is displayed.

* In that list, go to the row which you want to translate to another language, click on edit  and add that translation of the string.


Author: garima Categories: Drupal Tags:

Drupal: How to use separate template in separate page

April 13th, 2010

Drupal: Good article for Using Multiple Templates -

Author: garima Categories: Drupal Tags:

Difference Between PHP4 & PHP 5

April 12th, 2010

Difference Between PHP4 & PHP 5

1. Soap, MySQLi and Sqlite extension introduced in php5

2. Exception handling has been introduced in PHP5 (i.e. try and catch statements)

3. Objects can iterate through foreach in PHP5

$object = new IteratorTest();

foreach ($object as $value) {

print $value;

}

4. Added public/private/protected access modifiers in PHP5

5. Introduced Unified constructor name __construct() in PHP5

6. Object destructor support by defining a __destructor() method in PHP5

7. Introduced abstract classes & methods

Good article to go through:

http://devzone.zend.com/article/1714

Author: garima Categories: PHP Tags:

Difference between MyISAM and InnoDB

April 12th, 2010

Difference between MyISAM and InnoDB

1. Transactions: InnoDB support transactions means You can commit and rollback with InnoDB but with MyISAM once you issue a command it’s done. But MYISAM does not support any database transactions means if the transactions related to large amount of data transfer it will not provide because memory is less.

2. Locking: INNODB provide the row level locking means if you are performing an insert into InnoDB table only that row will be locked not the entire table. While MYISAM provide the table level locking means if the data in one row has been modified, the entire table will lock for the next process.

3. Foreign keys – InnoDB support FK constraint but MYISAM tables do not support.

4. Data Types: MYISAM provide a full variety of datatypes, but INNODB will not.

5. Full Text Search: InnoDB does not support Full Text search but MyIsam provide full text search.

6. Memory Space: MYISAM occupies less memory sapce for tables rather than InnoDB tables.

Author: gaurav Categories: MySQL Tags:
Site is Under Construction