原因不是很简单? 你根本就没有取过随机数。
---------------authpage.php--------------------
<?
srand((double)microtime()*1000000);
//验证用户输入是否和验证码一致
if(isset($HTTP_GET_VARS['authinput']))
{
if(strcmp($HTTP_GET_VARS['authnum'],$HTTP_GET_VARS['authinput'])==0)
echo "验证成功";
else
echo "校验失败";
}
while(($authnum=rand()%10000)<1000);?>
    <FORM METHOD="POST" ACTION="register_validate.php" NAME="form1" onsubmit="return check()">
              请输入您的手机号: 
              <INPUT TYPE="text" NAME="user_mobile" VALUE="13" maxlength="11" class="input1">
  <INPUT TYPE="hidden" NAME="register">
              <br/>
              请输入右边的验证码:
              <input name="auth_number" type="text" size="4" maxlength="4" class="input1">
              <img src="authimg1.php" width="80" height="20" border=0 alt="">
  <br/>
  <br/>
  <div align="center">
  <input name="Submit" type="submit" class="input" value="获取验证码">
  </div>
            </FORM>
-----------------------end-----------------------------
------------------------authimg1.php--------------------------
<?
session_start();$img_width=80;
$img_height=20;srand(microtime() * 100000);
for($ti=0;$ti<4;$ti++)
{
$new_number.=dechex(rand(0,15));
}$_SESSION[check_auth_number]=$new_number;
$number_img=imageCreate($img_width,$img_height);
ImageColorAllocate($number_img,255,255,255);
for($i=1;$i<=128;$i++)
{
imageString($number_img,1,mt_rand(1,$img_width),mt_rand(1,$img_height),"*",imageColorAllocate($number_img,mt_rand(200,255),mt_rand(200,255),mt_rand(200,255)));
}
for($i=0;$i<strlen($HTTP_SESSION_VARS[check_auth_number]);$i++)
{
imageString($number_img,mt_rand(3,5),$i*$img_width/4+mt_rand(1,8),mt_rand(1,$img_height/4), $HTTP_SESSION_VARS[check_auth_number][$i],imageColorAllocate($number_img,mt_rand(0,100),mt_rand(0,150),mt_rand(0,200)));
}
header("Content-type: image/png");
ImagePng($number_img);
ImageDestroy($number_img);
?>-------------------end--------------------