Forums

Setting cookies in a plugin? (1 post)

  1. jsandnes
    Member
    Posted 2 years ago #

    Hello everyone!

    I'm currently writing a plugin for me to be possible to get paid for some of the posts using SMS.

    So, basically what I do, I'm applying a filter to the_content(), and I check if the user has a cookie set, if not, the content is hidden, and a form to input a code (generated by SMS), to get access.

    If the code is correct, i want to set a cookie with a md5 sum of some things, and add the same md5sum with an expiry in the database; here is my problem. I cant create the cookie beacuse of the headers which obviously is already sent.

    So, then I wonder; Is there a way to set the cookie, using plugins? And how would I want to do it?

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by jsandnes
  • This topic is not a support question
  • WordPress version: 3.01