AttributionsTogether: 1
IDependOn-Set: 1
IDependOn-Set: 103
IDependOn-Set: 113
IDependOn-Set: 116
IDependOn-Set: 117
IDependOn-Set: 98
LastModifiedSecs: 1006810072
Parent: 103
SequenceNumber: 7
Title: snake.php
Part: 0
Author-Set: sauer@cloudmaster.com
LastModifiedSecs: 1006809949
Type:
Lines: 1
Replace all occurences of one word with another. Spurred by a converstaion wherin someone thought that a document mentioned deadly sinks when it was actually talking about deadly snakes. Ask Ben.
EndPart: 0
Part: 1
Author-Set: sauer@cloudmaster.com
LastModifiedSecs: 1006810072
Type: html
Lines: 2
http://www.teleologic.net/danny/demos/snake.php
http://www.teleologic.net/danny/demos/snake.phps
EndPart: 1
Part: 2
Author-Set: sauer@cloudmaster.com
LastModifiedSecs: 1006809978
Type: monospaced
Lines: 36
if($URL){
// protect against people leaving off http:// (unless host starts with h)
$URL = $URL[0]=="h" ? $URL : "http://$URL";
$fd = fopen($URL, "r") or die("Can't open $URL");
$contents = "";
while(!feof($fd)){
$contents .= fread($fd, 1024);
}
print str_replace(ucfirst($OLDWORD), ucfirst($NEWWORD),
str_replace($OLDWORD, $NEWWORD, $contents));
exit;
}
?>