]*\s)?)version\s*=\s*['\"]\s*0?.91\s*['\"]/i","$1".'version="allowHTML91"',$contents); } $contents = preg_replace("/($1",preg_replace("/<\?xml-stylesheet[^?]*\?(>)/i",'',preg_replace("/<(\/?)link/i","<$1fixlink",preg_replace("/<(\/?)image/i","<$1fiximage",preg_replace("/<(\/?)rss/i","<$1rssSpoof",preg_replace("/<(\/?)feed/i","<$1atomSpoof",$contents)))))); header('Content-Type: text/xml'); header('Content-Length: '.strlen($contents)); //IE doesn't work without it print $contents; } else { header('Content-Type: text/xml'); header('Content-Length: 562'); ?><?xml version="1.0" encoding="ISO-8859-1" ?> <?xml-stylesheet type="text/css" href="empty.css" ?> Please enter a valid feed URL http://www.google.com/search?q=rss Invalid feed URL detected http://www.google.com/search?q=rss RSS newsfeeds are served with a URL beginning with http:// or https:// tag with version="allowHTML91" - specifically, replace any occurrence of: /(]*\s)?)version\s*=\s*['"]0.91['"]/i with %FIRST_CAPTURE%version="allowHTML91" Remove any XML stylesheet links that are already in the feed - eg. Add a link to an empty XML stylesheet: before the first occurance of one of these tags: and with and respectively. Replace all occurrences of and with and respectively. Replace all occurrences of and with and respectively. Replace all occurrences of and with and respectively. Send the header "Content-Type: text/xml" (without quotes) Send the header "Content-Length: %LENGTH_OF_NEW_CONTENTS%" (without quotes) Print out the new contents. Exit. Error feed (indents and [windows] linebreaks are important and must be preserved exactly): Please enter a valid feed URL http://www.google.com/search?q=rss Invalid feed URL detected http://www.google.com/search?q=rss RSS newsfeeds are served with a URL beginning with http:// or https:// _______________________________________________________________________________________________________*/ ?>