Is there a script that does this?? Need some suggestions.

11 replies
Hey Warriors,

I wanted to know if there was a script that could restrict access to a specific page in the person unsubscribes.

For example, lets say someone wants to use my tool for free and they register with an email to have free access to the tool. Now, lets say they unsubscribe to the tool/email newsletter, I want to deny them access because they are no longer subscribed?

Basically if they are on the email list, they have access to the tool if they are not on the list or unsubscribe, they no longer have access.

Any ideas?

Thanks,

Jerry
#script #suggestions
  • Profile picture of the author Luxmo
    Depending on the software you use for your newsletter the process could be extremely easy.

    Very easy...
    1. check newsletter user database for existence of user (if they unsubscribed they should be removed from the db)
    2. if user account exists allow access, otherwise deny.

    Could be done with PHP+MySQL with minimal effort.

    Code:
    mysql_query("select username from newsletter_table_name where username = 'theuser' limit 1");
    if(mysql_num_rows()==1){
       // allowed to see this content
    }else{
       // denied!
    }
    Would help if we knew exactly what newsletter software you're using or plan to use.
    {{ DiscussionBoard.errors[2426003].message }}
    • Profile picture of the author jrod014
      Originally Posted by Luxmo View Post

      Depending on the software you use for your newsletter the process could be extremely easy.

      Very easy...
      1. check newsletter user database for existence of user (if they unsubscribed they should be removed from the db)
      2. if user account exists allow access, otherwise deny.

      Could be done with PHP+MySQL with minimal effort.

      Code:
      mysql_query("select username from newsletter_table_name where username = 'theuser' limit 1");
      if(mysql_num_rows()==1){
         // allowed to see this content
      }else{
         // denied!
      }
      Would help if we knew exactly what newsletter software you're using or plan to use.


      I'm currently using aweber.
      {{ DiscussionBoard.errors[2426618].message }}
      • Profile picture of the author Luxmo
        Originally Posted by jrod014 View Post

        I'm currently using aweber.
        Oh, that's an issue because they don't allow you to have dynamic access to your subscriber list. In order to do what you want to do you need dynamic access to your subscriber list...be it a text file saved on your web server or direct access to a database that has the subscribers. There's no way around it, you need "on-a-whim" access to that list to do anything dynamic.

        I recommend changing newsletter services if reasonably possible for you and maybe running your own newsletter software from your own web server/host...or find a newsletter host which allows dynamic access to your subscribers list.
        {{ DiscussionBoard.errors[2429246].message }}
  • Profile picture of the author Ori_G
    Luxmo - Perfect answer!
    {{ DiscussionBoard.errors[2426467].message }}
  • Profile picture of the author AndyBlackSEO
    Just a basic login system would do that checks against a database. If they aren't an active members then they can't access the tool.
    Signature
    [FREE SEO TOOL] Build 29 Effective, High Authority Backlinks that Will Increase Your Google Rankings in 2020... CLICK HERE ...
    ... Instant backlinks that can get you results within 24-72hrs.
    {{ DiscussionBoard.errors[2429434].message }}
  • Profile picture of the author burton247
    Agree with AndyBlackSEO have them login to view the page, simple. You need access to the database with your users in it though
    {{ DiscussionBoard.errors[2429461].message }}
  • Profile picture of the author Luxmo
    Read through the whole thread before posting guys, thanks.
    {{ DiscussionBoard.errors[2429579].message }}
  • Profile picture of the author burton247
    I thought the comment was of use because nowhere before Andys post was there any talk of a login
    {{ DiscussionBoard.errors[2429648].message }}
    • Profile picture of the author Luxmo
      Originally Posted by burton247 View Post

      I thought the comment was of use because nowhere before Andys post was there any talk of a login
      Look four posts above his.
      It's cool though I'm new here too...still gettin the feel of things.
      {{ DiscussionBoard.errors[2429711].message }}
  • Profile picture of the author burton247
    I completely understand what you're saying. I understood it but for someone who doesn't understand the way things work they my be confused as to where 'theuser' is assigned a value.

    I'm sorry if I misinterpreted your post
    {{ DiscussionBoard.errors[2429746].message }}
    • Profile picture of the author Luxmo
      Originally Posted by burton247 View Post

      I completely understand what you're saying. I understood it but for someone who doesn't understand the way things work they my be confused as to where 'theuser' is assigned a value.

      I'm sorry if I misinterpreted your post
      Well, I basically just outlined the concept and did a little bit of theory processing. Of course I didn't get into the details of everything...there's just too much. Like the MySQL table would need to have the comment_id auto_increment and be primary key, the table would also contain email and other info, database connection would need some processes added for security, etc...and yes, the 'theuser' would be a variable that would come from either a cookie or after the user has logged-in.
      {{ DiscussionBoard.errors[2429769].message }}

Trending Topics