Login   Register  
PHP Classes
elePHPant
Icontem

File: article.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Deanna Earley  >  networknews  >  article.php  >  Download  
File: article.php
Role: Example script
Content type: text/plain
Description: Sample article.php
Class: networknews
nntp browsing and viewing class
Author: By
Last change: fed the article body through htmlspecialchars before displaying
Date: 2002-07-24 12:41
Size: 848 bytes
 

Contents

Class file image Download
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <title><?php print $number?> - <?php print $group?> - news.earlsoft.co.uk</title>
 </head>
 <body>
<?php
require "common.inc";

$head $nntp->getarticlehead($group$number);
if (!
$head) {
  print 
"article not found";
} else {
  
$head $common->parseheader($head);
  print 
"  Subject: ".htmlspecialchars($head['subject'])."<br>\n";
  
$email $common->parseemail($head['from']); $email $email[0];
  print 
"  From: <a href=\"mailto:".urlencode($email['address'])."\">".htmlspecialchars($email['name'])."</a><br>\n";
  print 
"  <pre>".htmlspecialchars($nntp->getarticlebody($group$number))."</pre>";
}
?>
 </body>
</html>