#!/usr/bin/php -q = 300 and `users`.`id`=`email`.`memid` and `users`.`email`=`email`.`email`"; $res = mysql_query($query); while($row = mysql_fetch_assoc($res)) { $rnd = fopen("/dev/urandom", "r"); $hash = md5(fgets($rnd, 64)); fclose($rnd); mysql_query("update `email` set `hash`='$hash' where `id`='".$row['id']."'"); $body = "Hi ".$row['fname']."\n\n"; $body .= "Due to some bugs with the new website we initially had issues with emails being sent out. This email is being sent to those effected so they can be re-sent their email probe to over come earlier issues. We apologise for any inconvenience this may have cause. To verify your account, simply click on the link below.\n\n"; $body .= "http://www.cacert.org/verify.php?type=email&emailid=".$row['id']."&hash=$hash\n\n"; $body .= "Best Regards\nCAcert Support Team"; echo $row['email']."\n"; sendmail($row['email'], "[CAcert.org] Email Probe", $body, "support@cacert.org", "", "", "CAcert Support"); } ?>