if (isset($_GET["id"])) { $id = $_GET["id"];} else{ header("Location: index.php");} if ($dataHandle = @fopen("tutorial_data.txt", "r")) { for($iter = 0; $iter < $id; $iter++) { fgets($dataHandle); fgets($dataHandle); fgets($dataHandle); fgets($dataHandle); fgets($dataHandle); } if(($url = fgets($dataHandle)) !== false) { $url = trim($url); $title = trim(fgets($dataHandle)); fgets($dataHandle); fgets($dataHandle); $width = trim(fgets($dataHandle)); } else { echo "
An invalid ID was specified. Cannot display the tutorial.
"; exit; } fclose($dataHandle); } else { echo "Failed to open the tutorial data file. Cannot display the tutorial.
"; exit; } ?>