dcsimg
August 20, 2018
Hot Topics:

Cookies in an ISAPI Extension DLL

  • February 7, 2000
  • By Klynt Klimek
  • Send Email »
  • More Articles »

First of all, let's talk about how cookies work. Cookies are basically just variables, and can be VERY useful in state management, user identification, etc. Cookies are set and retrieved via the HTTP headers. To create a cookie, the server includes a "Set-Cookie" command in the header. After a cookie is set, the client will pass the cookies and their values to the server in the header of every HTTP request. More details of what to send and what is received can be found at http://www.netscape.com/newsref/std/cookie_spec.html

Below find source code for a CCookie class, with member functions GetCookie, SetCookie, and EnumCookies; as well as a sample ISAPI project.

To use the sample project, simply build it, and place ISAPICookies.DLL in your WWWROOT directory (make sure you have execute access enabled for that directory); then direct your browser to http://localhost/ISAPICookies.DLL

Feel free to contact me with any questions or comments.

Downloads

Download demo project - 14 Kb






Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

By submitting your information, you agree that developer.com may send you developer offers via email, phone and text message, as well as email offers about other products and services that developer believes may be of interest to you. developer will process your information in accordance with the Quinstreet Privacy Policy.

Sitemap

Thanks for your registration, follow us on our social networks to keep up-to-date