Hereby, I working in PHP Outside Magento Folder.Here I need to get Session values like Customer ID into Outside Magento.Here I working this sample code in outside Magento.
<?php
// Your Magento Mage.php
// Mage Enabler WordPress plugin users may
// skip line numbers 5, 6 and 7
require_once ("/var/www/magento_pack/app/Mage.php");
umask(0);
Mage::app("default");
#Mage::setIsDeveloperMode(true);
#ini_set('display_errors', 1);
umask(0);
Mage::app()->loadArea('frontend');
$layout = Mage::getSingleton('core/layout');
//load default xml layout handle and generate blocks
$layout->getUpdate()->load('default');
$layout->generateXml()->generateBlocks();
//get the loaded head and header blocks and output
$headBlock = $layout->getBlock('head');
$headerBlock = $layout->getBlock('header');
$footerBlock = $layout->getBlock('footer');
// echo $headBlock->toHtml() . $headerBlock->toHtml().$footerBlock->toHtml();
Mage::getSingleton('core/session', array('name' => 'frontend'));
if(Mage::getSingleton('customer/session')->isLoggedIn())
echo Mage::getSingleton('customer/session')->getId();
else
echo 'Not logged in';
exit;
But Doesnt show proper customers details.How to achieve outside magento session value exactly customer details.Kindly Advise me...