Hi, I'm trying to get some search results from google by using cURL and preg_match.
<?php
$curl = curl_init();
curl_setopt ($curl, CURLOPT_URL, "https://www.google.se/#q=horses");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec ($curl);
curl_close ($curl);
if(preg_match_all('#<cite>(.*)</cite>#', $result, $cite))
{
foreach($cite[0] as $cite)
{
echo $cite . '<br />';
}
}
?>
It doesnt work, I've used this code on other websites to get other things and it works there. What is the problem?
Thank you