Here's a simple question probably for you guys - but for me it's kinda headache...
I'm trying to create simple but dynamic page where I have text areas that will be frequently updated. The text areas may include also images. The code I'm trying to implement loads part of a text from "startstring" to "endstring" from "another" pages. Those "another" pages will be the ones I'll be updating then. So I wouldn't have to change or mess around with the whole layout.
<?php
$fd= fread(fopen("http://text1.htm", "r"), 100000);
if ($fd)
{
$start= strpos($fd, "startstring");
$finish= strpos($fd, "endstring");
$length= $finish-$start;
$code=Substr($fd, $start, $length);
}
echo $code;
?>
The reason I chose this code was that I was not able to remove the head and body tags from the htm page that I was trying to load into the main page using the include() and include_once(). If this code would work it would be almost perfect for me.
Here're the links for the samples:
http://209.197.99.236/phpdemo/load_php.php
And here's the question:
How can I make the code start after the "startstring", still using the "startstring" as the start of the string? I want to make sure it still works if the first word of the text is going to be different.
Thanks guys in advance!