<?php
session_start();
$sess_life_time = 21600; //in seconds
$sess_path = "/";
$sess_domain = ".localhost/second";
$sess_secure = true; // if you have secured session
$sess_httponly = true; // httponly flag
$_SESSION["some_name"] = "rajesh";
echo $_SESSION["some_name"];
session_set_cookie_params($sess_life_time, $sess_path, $sess_domain, $sess_secure, $sess_httponly);
?>In this code snippet you will learn session value used in another domain.
