Your IP : 216.73.216.40


Current Path : /var/www/html/mmishra/indem/scripts/php/
Upload File :
Current File : /var/www/html/mmishra/indem/scripts/php/findfile.php

<?php
$ds = ldap_connect("ldap.iiita.ac.in");
$no=0;$uid='';$maildir='';$found=''; 
	$rec = ldap_search($ds, "ou=btech,ou=student,dc=iiita,dc=ac,dc=in","(&(uid=*)(objectClass=posixAccount))");
	$i=0;
	while ($acc = ldap_get_entries($ds, $rec)) {
   		$uid = strtolower($acc[$i]["uid"][0]);
    		if ($uid) {
    			$maildir = $acc[$i]["mailmessagestore"][0] . 'cur';
			//echo $maildir . "\n";
			$found = shell_exec("ls -l $maildir | grep 'Oct 22 10:17' | awk '{print $9}'");
			echo $found . '.';
		} else break;
		$i++; 
	}
echo "status: $no found\n";
ldap_close($ds);
?>