Justtechjobs.com Find a programming school near you






Online Campus Both


php-general | 2001092

[PHP] Re: Grabbing From: _lallous (elias_bachaalany <email protected>)
Date: 09/21/01

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" <d <email protected>> wrote in message
news:PGEGIELINOCCEHLENIOJEENNCCAA.d <email protected>
> Hi,
>
> 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);
> fclose($open);
> $search = ereg("$begin(.*)$end", $search, $content);
>
> What i find strange is that the search only works on the actual text in
the
> html-document. It doesn´t seem to be able to use htmltags as $begin or
$end.
>
> And another question: does the "search" of $end begins from $begin? Or
does
> it scan the whole document for both strings?
>
> Regards
> # Daniel Alsén | www.mindbash.com #
> # d <email protected> | +46 704 86 14 92 #
> # ICQ: 63006462 | #
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe <email protected>
For additional commands, e-mail: php-general-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>