Thread: help with curl
View Single Post
Old 08-03-2008, 10:22 PM   #1 (permalink)
sarmenhb
The Addict
 
sarmenhb's Avatar
 
Join Date: Jan 2008
Location: los angeles
Posts: 309
Thanks: 44
sarmenhb is on a distinguished road
Default help with curl

im trying to figure out how to parse email addresses from a webpage
this is how far i got.

Code:
<?php 
$ch = curl_init(); 

curl_setopt($ch, CURLOPT_URL, 'http://www.google.com'); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); ;
$data = curl_exec($ch); 
curl_close($ch); 

?>
the variable $data holds the html source code and i tryed using preg_match to look for the email and print it out.
can someone show me a sample code on how to do this

thanks
__________________
no signature set
sarmenhb is offline  
Reply With Quote