X Tutup
grade; // If we have a POST, pass to the GET if ( count($_POST) > 0 ) { $_SESSION['postdata'] = $_POST; $count = 0; $good = 0; foreach($headers as $key => $val ) { if ( ! in_array($key,$fields) ) continue; $postkey = mapdown($key); $count++; if ( isset($_POST[$postkey])&& mapdown($_POST[$postkey]) == mapdown($val) ) { $good++; } } if ( $count == 0 ) { die("No expected fields found"); } $gradetosend = (1.0 * $good) / $count; LTIX::gradeSendDueDate($gradetosend, $oldgrade, $dueDate); header('Location: '.addSession('index.php')); return; } if ( $RESULT->grade > 0 ) { echo('

Your current grade on this assignment is: '.($RESULT->grade*100.0).'%

'."\n"); } if ( $dueDate->message ) { echo('

'.$dueDate->message.'

'."\n"); } $postdata = isset($_SESSION['postdata']) ? $_SESSION['postdata'] : array(); unset($_SESSION['postdata']); ?>

Exploring the HyperText Transport Protocol

You are to retrieve the following document using the HTTP protocol in a way that you can examine the HTTP Response headers.

There are three ways that you might retrieve this web page and look at the response headers:

Enter the header values in each of the fields below and press "Submit".

$val ) { if ( ! in_array($key,$fields) ) continue; $postkey = mapdown($key); $count++; echo(htmlentities($key).':
'); echo(' '); if ( mapdown($postdata[$postkey]) == mapdown($val) ) { echo(''); } else { echo(''); } } else { echo("/> "); } echo("
\n"); } ?>

instructor ) { echo("\n
"); echo("\n
\n");
echo("Retrieved information:\n");
print_r($headers);
echo("\n");
echo($data);
echo("\n
\n"); }
X Tutup