hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : get a cookie without knowing the cookie name?
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

get a cookie without knowing the cookie name?

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 05-15-2006, 11:36 PM
VolkNet VolkNet is offline
Web Hosting Master
 
Join Date: Jun 2004
Location: Bay Area -USA
Posts: 1,738

get a cookie without knowing the cookie name?


Is there a way to obtain all the cookie names that a user currently has and display them?

For example say you have set 3 cookies for this user:

cookie1
cookie2
cookie3

I want the script to be able to say you have the following for our site:

cookie1
cookie2
cookie3

Also, is there a way to do this in flash?

__________________
<<< Please see Forum Guidelines for signature setup. >>>

Reply With Quote


Sponsored Links
  #2  
Old 05-15-2006, 11:47 PM
Vdevelopers Vdevelopers is offline
Junior Guru Wannabe
 
Join Date: Sep 2004
Location: Rohnert Park, CA
Posts: 97
In PHP you can just do...

Code:
foreach ( $_COOKIE as $key => $value ) {
//.....
}
In PHP. I don't know that ActionScript has access to cookies, although you might consider putting the cookies in the calling of the Flash... instead of access myflash.swf, access myflash.swf?cookie1=data1&cookie2=data2 etc by creating a URL encoded string with PHP (or Perl or ASP.NET or whatever), that way you could probably just access all those variables by looping through the variables in the _root object, although I'm not sure how the specific could would look for that.

__________________
Joshua Simmons
Virtual Developer
www.v-dev.com/

Reply With Quote
  #3  
Old 05-16-2006, 02:41 AM
Burhan Burhan is offline
Community Guide
 
Join Date: Jul 2003
Location: Kuwait
Posts: 5,100
Just so its obvious, you can only display cookies that you have set (that are from your domain), not all cookies that the user has stored.

For Flash, I don't think you can do this natively, but you can pass the cookie information from a PHP or javascript snippet to flash and display it there.

__________________
In order to understand recursion, one must first understand recursion.
If you feel like it, you can read my blog
Signal > Noise

Reply With Quote
Sponsored Links
  #4  
Old 05-30-2006, 10:29 PM
sixabat sixabat is offline
New Member
 
Join Date: May 2006
Posts: 1
Quote:
Originally Posted by fyrestrtr
Just so its obvious, you can only display cookies that you have set (that are from your domain), not all cookies that the user has stored.

For Flash, I don't think you can do this natively, but you can pass the cookie information from a PHP or javascript snippet to flash and display it there.
also i have this quesion!
i want a clode like "escape(document.cookie)" but in actionscript not javascript
also i don't want use of this geturl("javascript:alert(document.cookie)")

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
The Host Group Launches Web Hosting Affiliate Partner Program Web Hosting News 2012-11-20 11:31:43
New Heart Internet Feature Helps Customers Sell Unwanted Domains through Control Panel Web Hosting News 2012-09-05 15:17:37
Professional Network LinkedIn Investigates Alleged Leak of 6.5M User Passwords Web Hosting News 2012-06-06 12:17:57
UK Web Host Heart Internet Offers New Version of Serif Web Builder for Free Web Hosting News 2012-05-30 16:13:47
New UK Cookie Law Impacts Customers - What About Hosts? Web Hosting News 2012-05-28 14:16:07


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?