<?php
//ini_set("allow_url_fopen", 1);
echo ("<br><br><br>");
echo ("UNIX time= ".time());
echo ('<H1>List of links</H1>');
//$command = "\cmd.exe";
//system('c:\\WINNT\\system32\\cmd.exe ');
//$outstring=system('jlt.txt');
//phpinfo();
//echo("<pre>$outstring</pre>");
//echo("changes made**** <br>");
//phpinfo();
$url = "google.com";
$filename = "jlt.txt";
$dir_output = `dir "c:\" `; // directory listing
$ping_output = `ping "$url" `;
$trc_output = `tracert"$url" `;
$type_output = `type "$filename" `; // text file contents
echo "<pre>";
echo "$dir_output <br>
$ping_output <br>
$trc_output <br>
$type_output";
echo "</pre>";
// Copy file data into a string
$filestring=file_get_contents("jlt.txt");
//$teststring=file_get_contents("jlt.txt");
//$pagehand=fopen("page.txt", "w");
//fwrite($pagehand, $outstring);
//fclose($pagehand);
$pos1=strpos($filestring, 'label type "');
if($pos1===FALSE){ echo ("Error in reading folder");}
while($pos1!==FALSE)
{
$pos1=$pos1+12;
$pos2=strpos($filestring, '"', $pos1);
//echo ("position1 is".$pos1);
//echo (" position2 is".$pos2);
//echo (" position3 is".$pos3);
$len1=$pos2-$pos1;
//echo (" lenght of URL is ".$len1);
$lbltype=substr($filestring, $pos1, $len1);
echo($lbltype);
echo("<br>");
$pos1=strpos($filestring, 'label type "', $pos2);
}
?>