PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 12th, 1999, 08:41 AM
webganzter
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
I want to use PHP to read the value in the cookie that was set by this CGI script :
cookie.cgi
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
#!/usr/bin/perl

print "Content-Type: text/htmln";
print "Set-Cookie: test123=hello; path=/~ritti/;nn";
[/quote]

I tried by using
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
<?php
echo $HTTP_COOKIE_VARS["test123"];
?>[/quote]
OR
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
<?php
echo $HTTP_COOKIE;
?>[/quote]
Both not work,.. Could anybody help me???

Thanks you so much

Reply With Quote
  #2  
Old November 13th, 1999, 12:45 PM
donarb
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Try $test123, PHP creates all variables for you that are returned by the client, including cookies.

Reply With Quote
  #3  
Old November 15th, 1999, 07:05 AM
webganzter
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Hi,.
That $test123 didn't work out too.
,,, The cookie was build by cgi which was created by perl ,.. and i want to use PHP to read it...

how could i do that???

Reply With Quote
  #4  
Old November 15th, 1999, 12:41 PM
matt_hz
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Hi!

I tried you're code but I changed the variable name from test123 to cookie and it worked.

In my PhP code I used what donarb said.
<? echo $cookie; ?>

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > Cookie , CGI and PHP problem.

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap