User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 375,199 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,071 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 398 | Replies: 3
Reply
Join Date: Feb 2008
Location: Cochin
Posts: 67
Reputation: jino is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 2
jino's Avatar
jino jino is offline Offline
Junior Poster in Training

May i know where is the cookie file stored in the computer.

  #1  
Apr 24th, 2008
Hi all,

Please tell me where is the cookie file stored in my computer when i run the below codes..
I checked it in the C:\

  1. <?php
  2. setcookie("test","john_joseph",time()+ 3600);
  3. ?>
  4. <html>
  5. <body>
  6. <form name="cookie" method="post" action="<?php echo $_server['php_self'];?>">
  7. Enter ur name:<input type="text" name="name">
  8. <input type="submit" name="submit" value="SUBMIT">
  9. </form>
  10. <?php
  11. if (isset($_COOKIE["test"]))
  12. echo "Welcome " . $_COOKIE["test"] . "!<br />";
  13. else
  14. echo "Welcome guest!<br />";
  15. ?></body>
  16. </html>



Thanks in advance
Last edited by peter_budo : Apr 26th, 2008 at 7:15 am. Reason: Keep It Organized - please use [code] tags
We only have to do a very few things right in our life, so long as we don't do too many things wrong.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2005
Location: Cologne, Germany
Posts: 93
Reputation: sDJh is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 8
sDJh sDJh is offline Offline
Junior Poster in Training

Re: May i know where is the cookie file stored in the computer.

  #2  
Apr 24th, 2008
That depends on you browser, of course. In IE (I just can guess) it is stored in Windows\Temp in a normal textfile. Opera saves all cookies in one file but but you can edit the cookies within the settings.
Firefox, Safari, Konqueror, etc save the cookies somehow else. But as I'm not using these, I don't know exactly how it works. You have to try out. Set a cookie and then use the Windows-Search-function to scan all files on your harddisk that may have stored the data from your cookie.
Reply With Quote  
Join Date: Apr 2008
Posts: 8
Reputation: vinothkumarc is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
vinothkumarc vinothkumarc is offline Offline
Newbie Poster

Re: May i know where is the cookie file stored in the computer.

  #3  
Apr 25th, 2008
for i.e7 C:\Documents and Settings\username\Local Settings\Temporary Internet Files
Thanks & Regards,
VinothKumar C
91+9841797606
post2vinoth@gmail.com
Reply With Quote  
Join Date: Sep 2005
Posts: 611
Reputation: digital-ether will become famous soon enough digital-ether will become famous soon enough 
Rep Power: 5
Solved Threads: 38
Moderator
digital-ether's Avatar
digital-ether digital-ether is offline Offline
Practically a Master Poster

Re: May i know where is the cookie file stored in the computer.

  #4  
Apr 26th, 2008
Originally Posted by jino View Post
Hi all,

Please tell me where is the cookie file stored in my computer when i run the below codes..
I checked it in the C:\

<?php
setcookie("test","john_joseph",time()+ 3600);
?>
<html>
<body>
<form name="cookie" method="post" action="<?php echo $_server['php_self'];?>">
Enter ur name:<input type="text" name="name">
<input type="submit" name="submit" value="SUBMIT">
</form>
<?php
if (isset($_COOKIE["test"]))
echo "Welcome " . $_COOKIE["test"] . "!<br />";
else
echo "Welcome guest!<br />";
?></body>
</html>



Thanks in advance


It depends on the HTTP client you use. Different web browsers store cookies in different locations, and in different formats.
TXT based HTTP clients such as CURL, or Linx, will save it somewhere else. etc.
www.fijiwebdesign.com - web design and development and fun
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb PHP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 2:31 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC