Created
May 21, 2012 16:10
-
-
Save orinx/2763064 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(isset($_POST["us_email"]) && isset($_POST["us_pw"]) && $_POST["us_email"] != "" && $_POST["us_pw"] != ""){ | |
try{ | |
$chk = imap_open("{mail.ntou.edu.tw:110/pop3/novalidate-cert}INBOX",$_POST["us_email"],$_POST["us_pw"]); | |
}catch (Exception $e){ | |
echo 'Caught exception: ', $e->getMessage(), "\n"; | |
} | |
if($chk =="") | |
echo "Status : login failed"; | |
else | |
echo "Status : login success"; | |
}else{ ?> | |
<div align="center"> | |
<form action="" method="post"> | |
<b>Username</b> : <input type="text" name="us_email"> </br> | |
<b>Password</b> : <input type="password" name="us_pw"></br> | |
<input type="submit"> | |
</form> | |
</div> | |
<?php } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment