/[clonezilla-sysresccd]/trunk/www/working/.news.php
ViewVC logotype

Diff of /trunk/www/working/.news.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 56 by sng, Fri May 21 14:49:03 2010 UTC revision 133 by sng, Wed Sep 22 14:44:59 2010 UTC
# Line 15  the site's <a href="http://clonezilla-sy Line 15  the site's <a href="http://clonezilla-sy
15    
16    
17  <?php  <?php
18    error_reporting(E_ALL);
19    // error_reporting(E_ERROR);
20    ini_set('display_errors', '1');
21    
22  $file = file_get_contents ('./clonezilla-sysresccd.rss');  $file = file_get_contents ('./clonezilla-sysresccd.rss');
23  $eReg = "<title>[^<]*<";  $eReg = "#<title>[^<]*<#";
24  $tReg = '<a name=\0"></a>\0';  $tReg = '<a name=\0"></a>\0';
25  $file = ereg_replace($eReg,$tReg,$file);  $file = preg_replace($eReg,$tReg,$file);
26    
27  $file = str_replace('<">','">',$file);  $file = str_replace('<">','">',$file);
28  $file = str_replace("<a name=<H2>","<a name=\"",$file);  $file = str_replace("<a name=<H2>","<a name=\"",$file);
# Line 38  $file = str_replace("</rss>","",$file); Line 42  $file = str_replace("</rss>","",$file);
42  //$file = str_replace("<channel>","",$file);  //$file = str_replace("<channel>","",$file);
43  $file = str_replace("</channel>","",$file);  $file = str_replace("</channel>","",$file);
44    
45  $eReg = "^" . ".*" . "<" . "/image" . ">";  $eReg = "#^" . ".*" . "<" . "/image" . ">#";
46  $file = ereg_replace($eReg,"",$file);  $file = preg_replace($eReg,"",$file);
47    
48    
49    $eReg = "#<" . "guid" . "[^<]*" . "<" . "/guid" . ">#";
50    $file = preg_replace($eReg,"",$file);
51    
52    
53    $eReg = "#<" . "link" . "[^<]*" . "<" . "/link" . ">#";
54    $file = preg_replace($eReg,"",$file);
55    
56    
57    
58    $eReg = "#<\?xml version=\"1.0\" encoding=\"UTF-8\"\?>.*</image>#is";
59    $file = preg_replace($eReg,"",$file);
60    
61    
62    
63    // Get top navigation div
64    $eReg = "#<div id=\"docline-top\">.*#";
65    $numMatch = preg_match($eReg,$file,$matches);
66    if($numMatch > 0)
67      $topNav = $matches[0];
68    // echo $topNav;
69    
70  $eReg = "<" . "guid" . "[^<]*" . "<" . "/guid" . ">";  // Get bottom navigation div
71  $file = ereg_replace($eReg,"",$file);  $eReg = "#<div id=\"docline-bottom\">.*#";
72    $numMatch = preg_match($eReg,$file,$matches);
73    if($numMatch > 0)
74      $bottomNav = $matches[0];
75    // echo $bottomNav;
76    
77    // Remove text starting from line 1 to
78    //   line containing <body> tag
79    $eReg="#<html.*</head>#is";
80    $file = preg_replace($eReg,"",$file);
81    $eReg = "#<!DOCTYPE HTML PUBLIC.*#i";
82    $file = preg_replace($eReg,"",$file);
83    $eReg = "#<body.*#i";
84    $file = preg_replace($eReg,"",$file);
85    
 $eReg = "<" . "link" . "[^<]*" . "<" . "/link" . ">";  
 $file = ereg_replace($eReg,"",$file);  
86    
87  //$file = ereg_replace();  //$file = ereg_replace();
88    

Legend:
Removed from v.56  
changed lines
  Added in v.133

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26