1. Tired of not being able to see links? Want to chat with other members? Need help?

  2. Community Awards!
    Have you voted yet? Take part in DevBest's yearly community awards! Click here to find out more.

Valid Email Script?

Discussion in 'Habbo Help & Support' started by sensaze, Feb 17, 2017.

  1. sensaze

    sensaze Member

    I'm wondering if there's a script anyone has made that makes people use valid email addresses when registering? E.G they have to verify before their account is activated?

    I'm doing this because I'm using a password reset script that allows you to send a password reset request to your email linked to your account.
     
  2. MasterJiq

    MasterJiq Member

    People can get your ip address. Using PHPMAiler and zoho.com for free email services.
     
  3. sensaze

    sensaze Member

    I can use a google smtp script to send emails from a gmail account, but I want to know how to force people to have a valid email via an 'activation link' when first signing up.
     
  4. Core

    Core Member

    or you can just cpanel which has smtp etc up and configured for you.
    Then it's as easy as using mail function no need for phpmailer etc
     
  5. sensaze

    sensaze Member

    I don't like cpanel, it's bloated and this doesn't solve my original query at all.
    When someone registers to my retro, like when you register to a forum, I want an email to be sent to them with a link they have to click to 'verify' their account before they can login.
     
  6. MasterJiq

    MasterJiq Member

    I think gmail after 1 Month you have to be paid, so zoho is the best and base on your own domain. I have mine but people can get your vps ip ?
     
  7. sensaze

    sensaze Member

    If you're using SMTP and a TCP proxy they shouldn't be able to get your IP address. It's still not my point though, I want people to have to actually verify their email address is real before they can play the retro, like normal habbo.
     
  8. nakkeost

    nakkeost github.com/marcus-sa

    Setup a SMTP server, easy. Just add an enum column in your users table, that indicates whether or not the users email is verified, and then detect if its not been verified then delete the user like after 3-5 days. Simple Googling.

    Sent from my SM-G928F using Tapatalk
     
    sensaze likes this.
  9. sensaze

    sensaze Member

    Thank you for actually understanding what it is I was wanting to do, have you perhaps got a more direct 'tutorial' on this?
     
  10. nakkeost

    nakkeost github.com/marcus-sa

    (I suppose you're using IIS)
    [ Want to see this link? Register ! ]

    For validation:
    [ Want to see this link? Register ! ]
    For confirmation script whatever:
    [ Want to see this link? Register ! ]

    Basically, you just generate a unique token that is used for checking against the verifying link, that will be sent throughout the email, then you got a enum('0','1') column and the varchar column for storing the token in. Normally, you would use cron jobs to automatically remove non-verified users like after 3-5 days.
     
    sensaze likes this.
  11. MasterJiq

    MasterJiq Member

    @gandaalfmcdaddy he's using BrainCMS, so go to [ Want to see this link? Register ! ] there you can get email forgot password system for brain.
     
  12. sensaze

    sensaze Member

    So lets say from a security point of view, I don't want my server IP leaking, so other than actually checking that [email protected] does actually exist all I would have to do is (correct me if im wrong).

    Create a new php file in my includes folder called emailcheck.php with this script:
    PHP:
    function myCheckDNSRR($hostName$recType '')
    {
      if(!empty(
    $hostName)) {
        if( 
    $recType == '' $recType "MX";
        
    exec("nslookup -type=$recType $hostName"$result);
        
    // check each line to find the one that starts with the host
        // name. If it exists then the function succeeded.
        
    foreach ($result as $line) {
          if(
    eregi("^$hostName",$line)) {
            return 
    true;
          }
        }
        
    // otherwise there was no mail handler for the domain
        
    return false;
      }
      return 
    false;
    }
    and then edit say my register.php page at the top with something like:

    PHP:
    <?php
        
    include_once 'includes/emailcheck.php';
    ?>
    --- Double Post Merged, Feb 17, 2017, Original Post Date: Feb 17, 2017 ---
    That is already configured correctly, I'm trying to ensure people actually sign up with a valid/working email address.
     

Share This Page

Loading...