• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 119
  • Last Modified:

How can my website place a cookie on my viewer's computer, and how for my app to read this cookie?

Hi, I'm a Windows software developer (Delphi) and I have an idea to track downloads of my software and also to test pricing... by placing a 'cookie' on the visitor's computer when he lands on my website, and then if the visitor chooses to download my app from my site, for my app to read this cookie. This cookie will basically contain just a simple unique text string to help me with my tracking. Thing is, I don't even know how to use cookies or how to work with them - I basically just know they exist! I need some instruction please on how to setup my website to place a cookie on my visitor's computer, and then how to retrieve/read this cookie.

Thanks!
    Shawn
0
shawn857
Asked:
shawn857
  • 2
  • 2
2 Solutions
 
Dave BaldwinFixer of ProblemsCommented:
Cookies can be placed in the user's browser either by javascript or by a server side programming language like ASP or PHP.  Note that different browsers do not share cookies so if you set it in IE, it will not exist in Firefox.  And cookies can only be read by the web site that places them.
0
 
shawn857Author Commented:
Dang, oh well, so much for the cookie angle. I didn't know they could only be read by browsers... I thought it might be a real readable file that was placed on the users system somewhere that I could open up and read programmatically from my application. Do you have any thoughts Dave, on how I might accomplish this? Basically what I'm looking for is, when someone visits the main page of my website, my website somehow places a small text file in their computer's Windows folder or somewhere like that.

Thanks
    Shawn
0
 
Dave BaldwinFixer of ProblemsCommented:
my website somehow places a small text file in their computer's Windows folder or somewhere like that.
That simply is not going to happen.  The only way you will get a file on that computer is thru a download. Then thru an install procedure, you could put a file where ever you have permissions to do so.  You can't force either of those things to happen.
0
 
RobOwner (Aidellio)Commented:
I understand where you're coming from with this approach however it will be unreliable and you're better off using a server side script such as PHP or ASP to monitor this.  For instance you may require registration before someone can download.  Those credentials could be used in your app to cross reference the user with their use of your software to the use of your website.
0
 
shawn857Author Commented:
OK, thank you guys.

Cheers
    Shawn
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now