You can also use output buffering, write cookies from anywhere, and at
the end of execution buffers will auto-flush.
[EMAIL PROTECTED] wrote:
Hello,
Most sites today seems to be based on this style:
include(top);
include(current_page);
include(bottom);
If one wants to set cookies from
William Stokes wrote:
Hello,
If I send a session cookie to browser where it is stored in WinXP? Or is it
stored as a separate file at all. I know that the script sends the cookie
but I can't find it in the client computer harddrive.
I am testing with Opera, IE6 and Firefox.
This is not
setcookie(UserName, $HTTP_POST_VARS['UserName'], time()+(60*10), /,
$HTTP_SERVER_VARS['SERVER_NAME']);
setcookie(Password, $password, time()+(60*10), /,
$HTTP_SERVER_VARS['SERVER_NAME']);
print login - set cookie;
sorry for kinda answering my own post... but anyway...
sorry for kinda answering my own post... but anyway...
Or you could use header()..
http://wp.netscape.com/newsref/std/cookie_spec.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
setcookie(UserName, $HTTP_POST_VARS['UserName'],
time()+(60*10), /,
$HTTP_SERVER_VARS['SERVER_NAME']);
setcookie(Password, $password, time()+(60*10), /,
$HTTP_SERVER_VARS['SERVER_NAME']);
print login - set cookie;
sorry for kinda answering my own post... but anyway...
Ok, I have changed my code so the headers are sent as:
header(HTTP/1.0 302 Redirect);
header(Location: index2.php);
header(Set-Cookie: USER_COOKIE=$sUser);
I have changed the file name to nph-unsecure.php
It successfully sends me to the index2.php page, but no cookie... any ideas
Joaco [EMAIL
If it's a real cookie, you can get it with php into the cookie vars..
If it's an asp session, forget it...
Carlos Castillo [EMAIL PROTECTED] a écrit dans le message de news:[EMAIL
PROTECTED]
HI,
I have the following problem, i have a website with php and asp files, in one asp
file i
Not possible AFAIK since it would negate the point in having a local cookie
policy and would leave possibility for abuse.
Bix
Joaco [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I was wondering if anyone out there knew if there was any code you could
add
to your page that would
What you describe is what SHOULD happen and does on that web site, that
does NOT happen on my web site, with the exact same code I posted in the
original message.
So, the question remains, what would cause the SID to be blank every
other click?
Yes, I have also used Netscape on Linux to
On Tuesday 05 November 2002 05:15, Steve Fatula wrote:
What you describe is what SHOULD happen and does on that web site, that
does NOT happen on my web site, with the exact same code I posted in the
original message.
Presumably the test website and your website are on different servers -- try
You do not need to add any SID to your links. Those will be added
automatically by the php session system when needed.
-Original Message-
From: Steve Fatula [mailto:sfatula;usa.net]
Sent: Saturday, November 02, 2002 10:29 PM
To: [EMAIL PROTECTED]
Subject: Cookies disabled, new session ID
Oleg and anyone else, PLEASE READ THE POST.
This is vendor software, this is what it does, it doesn't matter if it's
the way you would do it, if it is the best way, or anything else. So,
please tell me why the short program I uploaded as an example does or
does not work for you.
Steve
Oleg
If you want to see a site where the small program works (and be SURE and
turn cookies off), click here:
http://www.thewebmakerscorner.com/snapmods_new/default_test.php
So, can anyone tell me why it does not work on MY site(s)? Any ideas?
Surely this is a PHP configuration issue/bug perhaps?
On Monday 04 November 2002 10:24, Steve Fatula wrote:
If you want to see a site where the small program works (and be SURE and
turn cookies off), click here:
http://www.thewebmakerscorner.com/snapmods_new/default_test.php
So, can anyone tell me why it does not work on MY site(s)? Any ideas?
watch out for 4.2.2 if you use Apache 2.x.x. It seems to be okay with
Apache 1.3.26.
John
-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 26, 2002 12:33 PM
To: John S. Huggins
Cc: [EMAIL PROTECTED]
Subject: [PHP] Re: Cookies
Say it is not so
Before I started to read up on sessions, I simply used my own form of
session management by sending all relevant variables either via URL or
via form fields to the subsequent pages. Obviously this method leaves a
bunch of holes as well, but I KNOW that my application is always pure
and
Phpcoder [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I'm really battling with this whole session thing.
My first impressions are that cookies are OK, and really helps to make
sessions workable and efficient, YET, from a developers point of view, I
[..snip..]
Instead of Cookies, I use Sessions which is run on hte server side. So, I
use the
--snip--
$salt = strtoupper(md5(uniqid(rand(;
session_id($salt);
session_start();
header(Location: https://xxx.yyy.zzz/index.php?.SID.init_login=TRUE;);
--snip--
to create the identifer for an unique
Awesome Scott... That's some wicked code...
Scott Fletcher [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Instead of Cookies, I use Sessions which is run on hte server side. So, I
use the
--snip--
$salt = strtoupper(md5(uniqid(rand(;
Well, I have to have to it becuase my company is a credit report reseller.
I can't image if someone can easily break in. :-) As long as I don't work
for CIA or FBI then I'll be fine!
Kondwani Spike Mkandawire [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
on 19/07/02 1:19 AM, Cord Schneider ([EMAIL PROTECTED]) wrote:
A number of people have offered their opinion why cookies are a bad idea. As
a developer new to PHP, if cookies are such a big a big no-no, how does one
do effective session management without storing anything client-side?? Bear
I never heard of this php function, link(). Sound like a good function,
I'm going to have to look it up!
Thanks,
FletchSOD
Justin French [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
on 19/07/02 1:19 AM, Cord Schneider ([EMAIL PROTECTED]) wrote:
A number
on 19/07/02 4:49 AM, Scott Fletcher ([EMAIL PROTECTED]) wrote:
I never heard of this php function, link(). Sound like a good function,
I'm going to have to look it up!
Ummm, sorry, it's one that I wrote myself in my library of code -- not an
official function.
my function link() takes the
Justin French wrote:
JF As has been said on this list MANY times, just have a look at the big sites
JF like amazon.com -- no cookies, no javascript, no reliance on client-side for
JF anything. Take care of it all server-side, where you have a controlled
JF environment.
And what about
Nope thats not they way
If you don't specify a expire date it will live for ever or until you delete
it.
The only way is to set it with an expiry date and then it will delete
it'self when the browser closes.
Check this by running a file on the same domain with phpinfo();
No.
If you send no
Danny.
- Original Message -
From: vins [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 10, 2002 3:34 PM
Subject: [PHP] Re: cookies
Nope thats not they way
If you don't specify a expire date it will live for ever or until you
delete
it.
The only way i
Alexander Ross writes:
How can I set a cookie which expires when the borwser is closed?? How can I
delete a cookie via PHP?
Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
simply give it no experation time.
then
:
07/10/2002 Subject: [PHP] Re: cookies
09:58 AM
Nope thats not they way
If you don't specify a expire date it will live for ever or until you delete
it.
The only way is to set it with an expiry date and then it will delete
it'self when the browser closes.
Check this by running a file on the same domain with phpinfo();
Alexander Ross
']}brClose the window then return
and the cookie should be gone;
}
?
HTH
Danny.
- Original Message -
From: vins [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 10, 2002 3:34 PM
Subject: [PHP] Re: cookies
Nope thats not they way
If you don't specify a expire date
Hey,
for good (and funny) tutorial on cookies:
http://www.htmlgoodies.com/tutors/cookie.html
you can find some examples here:
http://www.php.net/manual/en/function.setcookie.php
Derick
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Paul O'Neil [EMAIL PROTECTED] wrote in message...
If a browser has cookies blocked , anyone have code if unable to
set cookie then goto another page.
at the top of a page.. psuedo code
if cookie['test'] exists...
if true //cool
else
if get['cookietest'] exists
Keep it mind that EGPCS is in that order for a reason. Changing it can open
up security problems...
-JAson Garbr
At 01:16 PM 11/20/2001 -0800, Fred wrote:
If you want certain variables to over ride cookie variables you need to
change the setting of the variables_order directive in
I believe it's just the opposite, for the sake of safety. Besides, good
coding practices in ANY language generally means you include all possible
information, required or not (it's like HTML; you don't have to use quotes
around attributes but to be forward compatible it's recommended).
Mike
Hi m8
I just say... rtfm ... start here:
From the manual:.. (http://www.php.net/manual/en/function.setcookie.php)
int setcookie (string name [, string value [, int expire [, string path [,
string domain [, int secure])
And this is where I say kma thanks.
J
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Check that you still have register_globals on/off in php.ini as before, and
that your GPC ordering is the same.
--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time:
37 matches
Mail list logo