All pastes #959470 Raw Edit

codePhil

public text v1 · immutable
#959470 ·published 2008-03-27 14:01 UTC
rendered paste body
$cas1=fopen("/home/philippe/Desktop/cas1.txt","r+");
//$cas2=fopen("/home/philppe/Desktop/cas2.txt","r+");
//$cas3=fopen("/home/philppe/Desktop/cas3.txt","r+");

//$output = array();
$infoModem = array();
$infoWvdial = array();
$infoErreurs = array();
//$output=str_replace(" ","°",explode("\r",shell_exec("wvdial 2>&1")));
			
$output=explode(" ",str_replace("<br>"," ",nl2br(fread($cas1,filesize("/home/philippe/Desktop/cas1.txt")))));
						
// itérateurs permettant la manipulation des tableaux
//Récupération des infos concernant le modemmmmmmmmmmmm
		
$i=0;
while($i<count($output))
{
	if ($output[$i]==="Modem<*1>:")	
	{
		$j=$i+1;
		//echo $j." => ".$output[$j]."<br>";
		while($output[$j] != "/> WvDial" || $output[$j] != "/> WvDial<*1>:" && $j<count($output))
		{
			//echo $j." => ".$output[$j]."<br>";
			array_push($infoModem,$output[$j]);
			$j++;
		}
		$i=$j;
	}
	else
	{$i++;}
}