| 
	
 | 
 Posted by Geoff Berrow on 07/11/07 15:05 
Message-ID: <f72qc7$fl9$1@north.jnrs.ja.net> from Steve Ray contained 
the following: 
 
>Is it possible in PHP to take a piece of code from this website and  
>reference it on my page,  I was thinking of something along the lines of: 
> 
>GREP from sitename | referencing this page | inside these markers 
 
LOL, that would have been covered in the follow-up PHP course Steve. Had 
there been one. :-( 
 
It's called screen scraping.  Experiment with this 
 
$html_content = implode('', file('http://www.example.com')); 
$begin="begin marker"; 
$end="end marker"; 
 
preg_match("/$begin(.*)$end/i", $html_content, $match[]); 
 
print_r($match); 
 
--  
Regards, 
 
Geoff Berrow
 
  
Navigation:
[Reply to this message] 
 |