473,508 Members | 2,445 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Session Variables htpps tp htpp

Ken
How do I carry Session variables between secure website (https) to unsecured
website(http)?

Ken
Jul 17 '05 #1
2 3527
Ken wrote:
How do I carry Session variables between secure website (https) to unsecured
website(http)?

Ken


If the domain name is the same, eg. http://www.example.com/ and
https://www.example.com/ then just use a cookie (see setcookie() function)

If not, pass the session name in the URL (provided
session.use_only_cookies is disabled) eg. if the session name is
PHPSESSID then call http://www.example.com/script.php?PHPSESSID=[sessionid]

--
Jasper Bryant-Greene
Cabbage Promotions
Jul 17 '05 #2
Ken
"Jasper Bryant-Greene" <ja******@gmail.com> wrote in message
news:aj*********************@news.xtra.co.nz...
Ken wrote:
How do I carry Session variables between secure website (https) to unsecured website(http)?

Ken
If the domain name is the same, eg. http://www.example.com/ and
https://www.example.com/ then just use a cookie (see setcookie() function)

If not, pass the session name in the URL (provided
session.use_only_cookies is disabled) eg. if the session name is
PHPSESSID then call

http://www.example.com/script.php?PHPSESSID=[sessionid]
--
Jasper Bryant-Greene
Cabbage Promotions


I tried these and they do not work. I receive a parse error. The ? seems
to be the problem.
$sessionid = session_id();
$sessionname=session_name();
header("Location:
http://".$_SERVER['HTTP_HOST']."/add_pic.php?".$sessionname."=".$sessionid;
header("Location:
http://".$_SERVER['HTTP_HOST']."/add_pic.php?".session_name=session_id;
header("Location:
http://".$_SERVER['HTTP_HOST']."/add_pic.php?".session_name=[session_id];
header("Location:
http://".$_SERVER['HTTP_HOST']."/add_pic.php?session_name=[session_id]";

Ken




Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2366
by: Al Jones | last post by:
This is a repost form the vbscript newgroup - if this isn't the appropriate group would you point me toward one that is. Basically, I seem to be losing session data part way though preparing an...
6
656
by: Lina Manjarres | last post by:
Hello, I have a session variable in a login page. Then I go to a form page where I uses the ProfileID and the UserID. Then I go to a result page where I would like to use the UserID as a filter,...
4
5574
by: PJ | last post by:
A particular page seems to be having issues with correctly setting Session variables. I am setting a couple of session variables on the Page_Unload event. While stepping through code, the...
31
6967
by: Harry Simpson | last post by:
I've come from the old ASP camp where session variables were not used. When i started using ASP.NET in 2001, I started using them again because it was ok from what I'd read. I've been merrily...
10
3478
by: tshad | last post by:
I have been using the default session state (InProc) and have found that I have been loosing my information after a period of time (normally 20 minutes). Is there anyway to find out how much...
3
2890
by: Alan Wang | last post by:
Hi there, Once my application gets complicated and complicated. I found it's really hard to keep track of Session value I am using in my asp.net application. I am just wondering if anyone have...
3
2664
by: Phillip N Rounds | last post by:
I'm writing a user control which has two states: Active & InActive. I additionally am required that there to be only one active control per page, and all logic has to be contained within the...
18
3401
by: BillE | last post by:
When a user opens a new IE browser window using File-New-Window the integrity of an application which relies on session state is COMPLETELY undermined. Anyone who overlooks the fact that...
26
3577
by: BillE | last post by:
Some ASP.NET applications use Session Variables extensively to maintain state. These should be re-written to use viewstate, hidden fields, querystring, etc. instead. This is because if a user...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7114
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7377
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7034
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7488
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5623
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
412
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.