I guess the ereg() will stop when i reads a new line character, therefore
try to use the preg_match() with /is modifiers.
preg_match("/$begin(.*?)$end", $search, $matches);
"Daniel alsén" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> iam trying to grab info from a webpage.
> This snippet is the part that does the actual searching...
> $site = "www.whatever.com/something.html";
> $open = fopen($site, "r");
> $search = fread($open, 20000);
> $search = ereg("$begin(.*)$end", $search, $content);
> What i find strange is that the search only works on the actual text in
> html-document. It doesn´t seem to be able to use htmltags as $begin or
> And another question: does the "search" of $end begins from $begin? Or
> it scan the whole document for both strings?
> # Daniel Alsén | www.mindbash.com #
> # [EMAIL PROTECTED] | +46 704 86 14 92 #
> # ICQ: 63006462 | #
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]