PHP Classes

dom adapter nzb parsing

Recommend this page to a friend!

      DOM Adapter  >  All threads  >  dom adapter nzb parsing  >  (Un) Subscribe thread alerts  
Subject:dom adapter nzb parsing
Summary:code to extract nzb content using dom adapter
Author:Michael Grier
Date:2006-12-11 17:52:13


  1. dom adapter nzb parsing   Reply   Report abuse  
Picture of Michael Grier Michael Grier - 2006-12-11 17:52:13
took some trial and error to figure this out, so here's the code I got to work for getting the content out of an nzb.


header("Content-Type: text/plain");

$xml=new DOMAdapter();

foreach($files as $file){
echo $subject."\n";
echo ' '.$poster."\n";
echo ' '.$date."\n";
foreach($groups as $group){
echo ' '.$group->get_content()."\n"; // group name
foreach($segments as $segment){
echo ' '.$segment->get_attribute('number')."\n";
echo ' '.$segment->get_attribute('bytes')."\n";
echo ' '.$segment->get_content()."\n"; // message-id