Show welcome message only once per day

If you want to display a welcome message or alert box then you have to add the following JavaScript in your file.

function setCookie(key, value) {
            var expires = new Date();
            expires.setTime(expires.getTime() + (1 * 24 * 60 * 60 * 1000));
            document.cookie = key + '=' + value + ';expires=' + expires.toUTCString();
        }

function getCookie(key) {
           var keyValue = document.cookie.match('(^|;) ?' + key + '=([^;]*)(;|$)');
           return keyValue ? keyValue[2] : null;
        }
if(getCookie('pop')==null)
{
	setCookie('pop',1);
	alert("WELCOME");
}

That’s it. In this code alert box shows only once per day.

Have any doubt, then comment here!

Difference between wp_insert_user() and wp_create_user()

There is no difference between wp_insert_user() and wp_create_user(). The entire source of wp_create_user() is given below

function wp_create_user($username, $password, $email = '') {
    $user_login = esc_sql( $username );
    $user_email = esc_sql( $email    );
    $user_pass = $password;

    $userdata = compact('user_login', 'user_email', 'user_pass');
    return wp_insert_user($userdata);
}

It just calls insert version almost immediately, basically a shorthand wrapper.