-
grab data crul?
I want to grab certion data from a curl request but cant find a way to make it work!
So far i have this:
PHP Code:
<?
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://www.google.com');
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($ch);
echo $data;
curl_close($ch);
?>
this shows the web page but i dont want all the page only a part of it.
-
Re: grab data crul?
have you even tried to "make it work"? you can either loop through $data line by line and look for the line number you want, or use a regular expression to match the information you might be interested in. what exactly are you trying to take from this page?