Posted by gardnern on 03/10/06 06:41
Assuming "&content=" isnt anywhere else in the txt file, you could use
PHPs explode function like so...
<?php
$textfile= "/usr/local/something.txt";
$handle = fopen($textfile, "r");
$contents = fread($handle, filesize($textfile));
fclose($handle);
$content = explode("&content=", $contents);
print($content[1]);
?>
fopen function..
http://www.php.net/manual/en/function.fopen.php
fread function...
http://www.php.net/manual/en/function.fread.php
explode function...
http://www.php.net/manual/en/function.explode.php
-Nathan
[Back to original message]
|