/* output in necessary format */
    if ($format == 'json') {
        header('Content-type: application/json');
        echo json_encode(array('users' => $posts));
    }
    /* disconnect from the db */
    @mysql_close($link);
}
if (isset($_GET['email'])) {
    if ($method == "registeruser") {
        $random = RandNumber(4);
        $result = "false";
        $result2 = "false";
        $isvalid = 'false';
        include "class.emailverify.php";
        $verify = new EmailVerify();
        $verify->debug_on = false;
        $verify->local_user = '******';
        //username of your address from which you are sending message to verify
        $verify->local_host = 'hundw.me';
        //domain name of your address
        if ($verify->verify($_GET['email'])) {
            $isvalid = 'true';
        } else {
            $isvalid = 'false';
        }
        if ($isvalid == 'true') {
            ////if email is available on the web
            /* connect to the db */
            $link = mysql_connect('localhost', 'root', '') or die('Cannot connect to the DB');
            mysql_select_db('users_db', $link) or die('Cannot select the DB');
コード例 #2
0
ファイル: example.php プロジェクト: ajjukht/emailverifier
<pre>
<?php 
include "class.emailverify.php";
$verify = new EmailVerify();
$verify->debug_on = true;
$verify->local_user = '******';
//username of your address from which you are sending message to verify
$verify->local_host = 'localhost';
//domain name of your address
if ($verify->verify('*****@*****.**')) {
    echo 'Valid email address';
} else {
    echo 'Invalid Email Address';
}
?>
</pre>