1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-05 10:49:37 +02:00

use medium images from google, not any

This commit is contained in:
martian 2010-02-12 03:28:49 +00:00
parent 134adf17af
commit 6c7d0fffeb

View file

@ -430,7 +430,11 @@ class Album extends database_object {
$search = rawurlencode($search);
$html = file_get_contents("http://images.google.com/images?source=hp&q=$search&oq=&um=1&ie=UTF-8&sa=N&tab=wi&start=0&tbo=1");
//$size = ''; // Any
$size = '&imgsz=m'; // Medium
//$size = '&imgsz=l'; // Large
$html = file_get_contents("http://images.google.com/images?source=hp&q=$search&oq=&um=1&ie=UTF-8&sa=N&tab=wi&start=0&tbo=1$size");
if(preg_match_all("|\ssrc\=\"(http.+?)\"|", $html, $matches, PREG_PATTERN_ORDER))
foreach ($matches[1] as $match) {