public function fotoBul($kelime="", $max=9) { $url="https://www.google.com/search?safe=off&site=&tbm=isch&source=hp&biw=1644&bih=1200&q=".urlencode($kelime); $html = new \Htmldom($url); $i=0; foreach($html->find('img') as $element){ if(preg_match("/http/", $element->src)){ if($i<$max){ $dizi[]=$element->src; $i++; } } } return $dizi; }