note 60337 added to function.preg-match-all
| From: | theentity_ica at yahoo dot com | Date: | Wed, 04 Jan 2006 09:11:08 +0000 |
| Subject: | note 60337 added to function.preg-match-all | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-101183@lists.php.net to get a copy of this message | ||
$data = implode ("",file('http://www.phpit.net/'));
$urlpattern = "/<div class=contentitem>([^`]*?)</div>/";
preg_match_all ($urlpattern, $data, $matches);
o/p
Warning: Unknown modifier 'd' in /var/www/html/scrape.php on line 11
Warning: Cannot add header information - headers already sent by (output started at
/var/www/html/scrape.php:11) in /var/www/html/scrape.php on line 16
The latest content from PHPit (http://www.phpit.net), screen scraped! http://www.wikipedia.org en-us
Warning: Invalid argument supplied for foreach() in /var/www/html/scrape.php on line 38
we want all the content from the div tag!
----
Manual Page -- http://www.php.net/manual/en/function.preg-match-all.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+60337
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+60337&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+60337&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+60337&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+60337&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+60337&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+60337&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+60337&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+60337&report=yes
Search -- http://master.php.net/manage/user-notes.php