This page will only be accessed from the localhost. I am trying to allow a technician to change the ip configuration by simply entering the information into a form. The code works great except that I cannot find a way to display the results in a readable form, it's one continuous line. I know I need to have the \n to designate a new line but I am not able to do that when passing command line results. I've tried using passthru(), system(), and redirecting to a txt file and then using fread(). I would greatly appreciate any suggestions anyone has. I need to display either the results of the "netsh" command or use the output of a seperate "ipconfig" command. <?php $ipaddress = $_POST['ipaddress']; $subnetmask = $_POST['subnetmask']; $gateway = $_POST['defaultgateway']; $DnsServer = $_POST['dnsserver']; $wait = "Changing Network Settings..."; echo "<br>".$wait."<br><p>"; $filename = 'savesettings.txt'; $fp = fopen($filename, "w"); $line1 = "pushd interface \r\n"; $line2 = "reset all\r\n"; $line3 = "popd \r\n"; $line4 = "pushd interface ipv6 \r\n"; $line5 = "uninstall \r\n"; $line6 = "popd \r\n"; $line7 = "pushd interface ipv6 isatap \r\n"; $line8 = "popd \r\n"; $line9 = "pushd interface ipv6 6to4 \r\n"; $line10 = "reset \r\n"; $line11 = "popd \r\n"; $line12 = "pushd interface portproxy \r\n"; $line13 = "reset \r\n"; $line14 = "popd \r\n"; $line15 = "pushd interface ip \r\n"; $line16 = "set address name=\"Local Area Connection\" source=static addr=$ipaddress mask=$subnetmask \r\n"; $line17 = "set address name=\"Local Area Connection\" source=static gateway=$gateway gwmetric=0 \r\n"; $line18 = "set dns name=\"Local Area Connection\" source=static addr=$DnsServer \r\n"; $write = fputs($fp, $line1); $write = fputs($fp, $line2); $write = fputs($fp, $line3); $write = fputs($fp, $line4); $write = fputs($fp, $line5); $write = fputs($fp, $line6); $write = fputs($fp, $line7); $write = fputs($fp, $line8); $write = fputs($fp, $line9); $write = fputs($fp, $line10); $write = fputs($fp, $line11); $write = fputs($fp, $line12); $write = fputs($fp, $line13); $write = fputs($fp, $line14); $write = fputs($fp, $line15); $write = fputs($fp, $line16); $write = fputs($fp, $line17); $write = fputs($fp, $line18); fclose($fp); passthru('netsh exec savesettings.txt'); ?> I know this may not be the most efficient way to do this but it is my first php project. I welcome any suggestions for a more efficient way to do it. Thanks in advance!