/* You can add any HTML you like in this section */
/* The above URL calls this file when the user submits the form, so be sure to change it to your own URL if you are making your own version of this file */ The URL of your web page:
(include http:// and a final "/" or a filename)

(.+?)%is"; /* This defines everything between each set of
tags as a weblog item */ $allowable_tags = "

      • "; /* This defines tags that will not be stripped from the item text. (Not used in this version) */ $urlparts = parse_url($url); if ($urlparts[path] == "") $url .= "/"; /* This makes sure the URL ends either with a filename or a slash */ $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 8); $data = curl_exec($ch) or die("Error reading RSS data."); curl_close($ch); /* This reads in the contents of the weblog page */ } // print "
        ";
        //  line 47 print htmlentities($data);  
                            /* These commented out lines can be used in testing */
        
          eregi("(.*)", $data, $title);
          $channel_title = $title[1];
                            /* This picks up the title of the weblog page (from the
                               page metadata) to use as the title of the RSS channel */
        
          $match_count = preg_match_all($itemregexp, $data, $items);
          $match_count = ($match_count > 15) ? 15 : $match_count;
                            /* This collects each of the weblog items, up to a  
                               maximum of 15 */
          
          header("Content-Type: text/xml");
                            /* This starts generating the RSS feed as an XML file. 
                               The next twelve lines set up the XML page header */
        
          $output .= "\n";
          $output .= "\n";
          $output .= "\n";
          $output .= "%HTMLlat1;]>\n";
        
          $output .= "\n";
          $output .= "  \n";
          $output .= "    ". htmlentities(strip_tags($channel_title)) ."\n";
          $output .= "    ". htmlentities($url) ."\n";
          $output .= "    ". htmlentities($url) ." via appswitching.net\n";
          $output .= "    ". htmlentities("webmaster@pcxvs.com") ."\n";
          $output .= "    en-us\n";
        
          for ($i=0; $i< $match_count; $i++) {
                            /* This begins the process of generating each separate entry */
        
            $body = $items[1][$i];
                            /* The first step names $body as the contents of the item */
            if (preg_match ("/rssi1/i", $body)) {
              preg_match ("%rssi1 *\" *>(.+?)");
              $desc = substr(trim(strip_tags($desc)),0,120);
                           /* The final step picks the first 120 characters
                              after the title as the item description,
                              after stripping out tags (earlier versions
                              left in allowable tags) */
            } else {
              $desc = substr(trim(strip_tags($body)),0,120);
                           /* If there's no title, the description just starts
                              from the beginning of the item */
            }
            $desc = substr($desc, 0, strrpos($desc, " ")) . " ...";
                           /* This line pares off truncated words and characters 
                              at the end of the description (added in version 0.95) */
            $desc = htmlentities($desc);
                           /* The next few lines write out each item in RSS format */
              
            $output .= "    \n";
            $output .= "      ". htmlentities($title) ."\n";
            $output .= "      ". htmlentities($item_url) ."\n";
            $output .= "      ". $desc ."\n";
            $output .= "    \n";
          }
        
          $output .= "  \n";
          $output .= "\n";
                           /* The final steps complete and then output the XML document */
        
          print $output;
        //  print htmlentities($output);
        //  print "
        "; } function get_link($body, $url) { /* This is the function for picking out the item URL */ if (stristr($body, "rssi2\" href")) { $linkurl = stristr($body, "rssi2\" href"); $linkurl = substr($linkurl, strpos($linkurl, "\"")+1); $linkurl = substr($linkurl, strpos($linkurl, "\"")+1); $linkurl = substr($linkurl, 0, strpos($linkurl, "\"")); $linkurl = trim($linkurl); return $linkurl; /* These steps locate and copy the item URL */ } else { return $url; /* If there's no permalink defined, the weblog URL is used instead */ } } ?>