View Single Post
Old 03-27-2003   #6 (permalink)
lala
Registered Member
 
Join Date: Sep 2002
Posts: 5
from your Java thing i did a PHP thing to convert you line in to one that works in oziexplorer and waypoint +

(where in is the out from the java thingie)
Code:
<?

$filename = $SCRIPT_PATH . "/in.txt";
$text = file("$filename"); 
while(list($linenum,$data) = each($text)) { 
if($datas = explode(",",$data)) { 

$linenumb = $linenum+1;
echo "<small><small>In data_________";
echo "$datas[0]  $datas[1]  $datas[2]  $datas[3]  $datas[4]  "; 

$filenameout = $SCRIPT_PATH . "/out.txt";
$fp = fopen ("$filenameout","a+"); 
$out1 =  "WP";
$commer =  ",";
$out3 =  "D";
$date = "";
$time = "";



$content =  "$out1$commer$out3$commer  $datas[2] $commer $datas[0]$commer $datas[1]$commer $date $commer $time $commer $datas[2]\r\n" ;
fwrite ($fp, $content); 
fclose ($fp);
echo "<br><i>Out Data________";
echo $content ;
echo "<br></i>";
} else { 
echo "ERROR doing SOMETHING :( "; 
} 
} 
?>
lala is offline   Reply With Quote