TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Session Value Used in Another Domain
Bhushan Singh
Dec 23
2015
Code
1.1
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
<?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
);
?>
session value
anther domain
php