PHP Classes
elePHPant
Icontem

File: flip_acronyms.php

Recommend this page to a friend!
  Classes of Jill Lingoff  >  Sweeper  >  flip_acronyms.php  >  Download  
File: flip_acronyms.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Sweeper
Clean HTML to remove unwanted tags and attributes
Author: By
Last change:
Date: 2 months ago
Size: 228 bytes
 

Contents

Class file image Download
<?php

// flip acronyms

$url = $_REQUEST["url"];
$contents = file_get_contents($url);

$contents = preg_replace('/<(abbr|acronym) title="([^"]*?)">([^<>]*?)<\/\1>/is', '<$1 title="$3">$2</$1>', $contents);
print(
$contents);

?>