Login   Register  
PHP Classes

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: 12 years ago
Size: 848 bytes


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

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