Tuesday, August 5, 2014

Magento Remote IP Address

//Get Visitor's information  
  $visitorData = Mage::getSingleton('core/session')->getVisitorData();  

  // printing visitor information data  
  echo "
"
; print_r($visitorData); echo "
"; // user's ip address (visitor's ip address) $remoteAddr = Mage::helper('core/http')->getRemoteAddr(true); // server's ip address (where the current script is) $serverAddr = Mage::helper('core/http')->getServerAddr(true);

About

Blogger templates