Tengo un .php con el siguiente codigo:
Código PHP:
<?
Error_reporting(0);
$dbhost = "*******";
$dbuser = "****";
$dbpasswd = "******";
$dir = 'C:\\HB';
$msconnect = mssql_connect($dbhost,$dbuser,$dbpasswd);
$selected = mssql_select_db('ws1', $msconnect);
$consulta = mssql_query("SELECT cAccountID FROM CHARACTER_T WHERE sAdminLevel = 0");
///////////
$b = 0;
$row = mssql_fetch_array($consulta);
foreach($row as $b){
$account = $row['cAccountID'];
$len = strlen($account);
$acc_arr = split(' ', $account);
$acc = $acc_arr[0];
$fl = substr($acc, 0, 1);
$ascii = ord($fl);
$filename = $dir . '\\Account\\ASCII' . $ascii . '\\' . $acc . '.txt';
$lines = file($filename);
$a = 0;
foreach($lines as $a){
$mail = substr($a, 0, 13);
if($mail == 'account-Email'){
$email = substr($a, 19, 99);
echo $email;
}
}
}
?>
Como debo hacerlo? Ayuda
Saludos,
ArgoN